This file contains 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
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); |
This file contains 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
define( 'WP_MEMORY_LIMIT', '96M' ); |
This file contains 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_value memory_limit 256M | |
php_value post_max_size 128M | |
php_value upload_max_filesize 32M | |
php_value max_input_vars 3000 | |
php_value max_execution_time 300 |
This file contains 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
memory_limit = 256M | |
post_max_size = 128M | |
upload_max_filesize = 32M | |
max_input_vars = 3000 | |
max_execution_time = 300 | |
This file contains 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
/** | |
* @snippet Rename State Field Label @ WooCommerce Checkout | |
* @author NCY DESIGN https://wordpress.ncy.design | |
* @compatible WooCommerce 3.7 | |
*/ | |
add_filter( 'woocommerce_default_address_fields' , 'ncydesign_rename_state_province', 9999 ); | |
function ncydesign_rename_state_province( $fields ) { | |
$fields['state']['label'] = 'Province'; |
This file contains 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
/** | |
* Auto Complete all WooCommerce orders. | |
*/ | |
add_action( 'woocommerce_thankyou', 'ncydesign_woocommerce_auto_complete_order' ); | |
function ncydesign_woocommerce_auto_complete_order( $order_id ) { | |
if ( ! $order_id ) { | |
return; | |
} | |
$order = wc_get_order( $order_id ); |
This file contains 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 conditionally cart items based on a specific product (item) | |
add_action( 'woocommerce_before_calculate_totals', 'remove_cart_items_conditionally', 10, 1 ); | |
function remove_cart_items_conditionally( $cart ) { | |
// HERE define your specific product ID | |
$specific_product_id = 37; | |
if ( is_admin() && ! defined( 'DOING_AJAX' ) ) | |
return; | |
$cart_items = $cart->get_cart(); // Cart items array |
This file contains 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
/** | |
* @snippet Simple Checkout for virtual Products | |
* @author NCY Design https://wordpress.ncy.design | |
* @compatible WooCommerce 3.7.0 | |
*/ | |
add_filter( 'woocommerce_checkout_fields' , 'ncydesign_virtualproduct_checkout' ); | |
function ncydesign_virtualproduct_checkout( $fields ) { | |
NewerOlder