esc_html__( 'Product Feed', 'wp-product-feed-manager' ), 'target' => 'wppfm_product_feed_tab', 'priority' => 55, ); return $tabs; } add_filter( 'woocommerce_product_data_tabs', 'wppfm_product_feed_tab' ); /** * Renders the Product Feed tab content. Triggered by the 'woocommerce_product_data_panels' action. * * @since 3.12.0. - Added a nonce field to the checkbox form. */ function wppfm_render_product_feed_tab() { // The Product Feed tab content ?>
'wppfm-exclude-from-feed-checkbox', 'name' => 'wppfm_exclude_from_feed', 'wrapper_class' => 'show_if_simple show_if_variable', 'value' => get_post_meta( get_the_ID(), 'wppfm_exclude_from_feed', true ), 'label' => esc_html__( 'Exclude from Feed', 'wp-product-feed-manager' ), 'description' => esc_html__( 'Activate this option to mark this product for exclusion. Use the Feed Manager Product Filter to remove marked products from feeds', 'wp-product-feed-manager' ), 'default' => '0', 'desc_tip' => false, ) ); // Adding a nonce field to the form wp_nonce_field( 'wppfm_exclude_from_feed_nonce_action', 'wppfm_exclude_from_feed_nonce' ); do_action( 'wppfm_woocommerce_product_feed_panel' ); ?>
ID, 'wppfm_exclude_from_feed', true ); ?>