Created
February 1, 2021 16:21
-
-
Save billrobbins/48eec3550f27b62f5b2eb26d98b46c59 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sv_facebook_feed_url_admin_notice(){ | |
if ( class_exists( 'WC_Facebook_Product_Feed' ) ) { | |
$feed_file_url = class_exists( 'SkyVerge\WooCommerce\Facebook\Products\Feed' ) ? get_bloginfo( 'url' ) . '/?wc-api=wc_facebook_get_feed_data&secret=' . SkyVerge\WooCommerce\Facebook\Products\Feed::get_feed_secret() : ''; | |
if ( ( isset( $_GET['page'], $_GET['tab'], $_GET['section'] ) && | |
( 'wc-settings' == $_GET['page'] && 'integration' == $_GET['tab'] && | |
'facebookcommerce' == $_GET['section'] ) ) || | |
( isset( $_GET['page'] ) && 'wc-facebook' == $_GET['page'] ) ) { | |
echo '<div class="notice notice-warning">'; | |
echo '<p>Feed URL: <a href="' . $feed_file_url . '">' . $feed_file_url . '</a></p>'; | |
echo '</div>'; | |
} | |
} | |
} | |
add_action( 'admin_notices', 'sv_facebook_feed_url_admin_notice' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment