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
<?php | |
add_filter( 'woocommerce_gpf_feed_item_google', function ( $feed_item, $wc_product ) { | |
$feed_item->additional_elements['custom_label_4'] = [ $wc_product->get_id() ]; | |
return $feed_item; | |
}, 10, 2 ); |
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
<?php | |
// Examples of the filter to use to disable recovered cart notifications. | |
add_filter( 'crfw_send_recovered_cart_notifications', '__return_false' ); | |
// Examples of the filter to use to disable unrecovered cart notifications. | |
add_filter( 'crfwp_send_unrecovered_cart_notifications', '__return_false' ); |
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
<?php | |
add_filter( 'woocommerce_gpf_feed_item_google', function ( $feed_item, $wc_product ) { | |
$feed_item->additional_elements['shipping'] = [ | |
[ | |
'country' => 'GB', | |
'region' => 'Cumbria', | |
'service' => 'Royal Mail', | |
'price' => '1.99 GBP', | |
] |
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
<?php | |
add_filter( 'woocommerce_gpf_number_of_product_detail_fields', function ($x) { | |
// Change 5 to your desired number. | |
return 5; | |
}); |
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
<?php | |
add_filter( 'woocommerce_gpf_feed_item_google', function ($feed_item, $wc_product) { | |
if (!empty($feed_item->title) && empty($feed_item->additional_elements['custom_label_1'])) { | |
$feed_item->additional_elements['custom_label_1'] = [ $feed_item->title ]; | |
} | |
return $feed_item; | |
}, 10, 2 ); |
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
<?php | |
/* | |
* Plugin Name: Mark GPF fields as pre-populatable | |
* Plugin URI: http://docs.woothemes.com/document/google-product-feed/ | |
* Description: Example of how to mark a field as pre-populatable in the Google Product Feed plugin. | |
* Version: 1.0 | |
* Author: Ademti Software | |
* Author URI: https://www.ademti-software.co.uk/ | |
*/ |
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
<?php | |
function lw_gpf_exclude_product($excluded, $product_id, $feed_format) { | |
// Return TRUE to specifically exclude a product | |
// Return FALSE to specifically include it | |
// Return $excluded to use the default behaviour as calculated by the extension | |
return $excluded; | |
} | |
add_filter( 'woocommerce_gpf_exclude_product', 'lw_gpf_exclude_product', 11, 3); |
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
<?php | |
add_action( 'init', function () { | |
global $woocommerce_msrp_frontend; | |
remove_action( | |
'woocommerce_single_product_summary', | |
[ $woocommerce_msrp_frontend, 'show_msrp' ], | |
7 | |
); | |
add_action( |
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
<?php | |
/* | |
* Plugin Name: Language-specific replacements for Say What? Pro | |
* Plugin URI: https://plugins.leewillis.co.uk/ | |
* Description: Enables language-specific replacements in the Say What? Pro plugin | |
* Version: 1.0 | |
* Author: Ademti Software Ltd | |
* Author URI: https://www.ademti-software.co.uk/ | |
*/ |
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
<?php | |
add_filter( 'woocommerce_gpf_elements_google', function ( $elements, $general_id, $specific_id ) { | |
// Customise/add $elements['google_product_category'] here. e.g. | |
// $elements['google_product_category'] = [ 'My actual category' ]; | |
return $elements; | |
}, 10, 3 ); |