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 | |
/** | |
* When you hover a product image when on the single product page, you can zoom on the products images; I love this feature, however | |
* Some people would like to remove it. | |
* To do so, simply paste this snippet in your functions.php file | |
*/ | |
add_action( 'after_setup_theme', 'theme_name_setup' ); | |
function theme_name_setup() { | |
remove_theme_support( 'wc-product-gallery-zoom' ); |
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 | |
/* | |
* Create order dynamically | |
*/ | |
add_action( 'woocommerce_before_checkout_form', 'create_order' ); | |
function create_order() { | |
global $woocommerce; | |
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
/* | |
* Remove the default WooCommerce 3 JSON/LD structured data format | |
*/ | |
function remove_output_structured_data() { | |
remove_action( 'wp_footer', array( WC()->structured_data, 'output_structured_data' ), 10 ); // Frontend pages | |
remove_action( 'woocommerce_email_order_details', array( WC()->structured_data, 'output_email_structured_data' ), 30 ); // Emails | |
} | |
add_action( 'init', 'remove_output_structured_data' ); |
NewerOlder