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 filter_woocommerce_currency_symbol( $currency_symbol, $currency ) { | |
// Compare | |
switch( $currency ) { | |
case 'GBP': $currency_symbol = '€'; | |
break; | |
} | |
return $currency_symbol; | |
} | |
add_filter( 'woocommerce_currency_symbol', 'filter_woocommerce_currency_symbol', 1, 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
add_filter( 'woocommerce_shipping_chosen_method', '__return_false', 99); |
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 update_focus_keywords() { | |
$posts = get_posts(array( | |
'posts_per_page' => -1, | |
'post_type' => 'product' // Replace post with the name of your post type | |
)); | |
foreach($posts as $p){ | |
// Checks if Rank Math keyword already exists and only updates if it doesn't have it | |
$rank_math_keyword = get_post_meta( $p->ID, 'rank_math_focus_keyword', true ); | |
if ( ! $rank_math_keyword ){ | |
update_post_meta($p->ID,'rank_math_focus_keyword',strtolower(get_the_title($p->ID))); |
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
add_filter( ‘wc_stripe_load_scripts_on_product_page_when_prbs_disabled’, ‘__return_false’ ); | |
add_filter( ‘wc_stripe_load_scripts_on_cart_page_when_prbs_disabled’, ‘__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
function virtual_product_woocommerce_order_status( $order_id ) { | |
if( ! $order_id ) return; | |
$order = wc_get_order( $order_id ); | |
$order_items = $order->get_items(); | |
$is_virtual_found = false; | |
$order_product_ids = array(); |
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 wc_as_retention_period() { | |
return DAY_IN_SECONDS; | |
} | |
add_filter( 'action_scheduler_retention_period', 'wc_as_retention_period' ); |
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
add_filter( 'woocommerce_order_item_needs_processing', '__return_true' ); |
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
add_filter( 'wc_bookings_calendar_default_to_current_date', '__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
add_filter( 'woocommerce_quantity_input_min', 'hide_woocommerce_quantity_input', 10, 2 ); | |
add_filter( 'woocommerce_quantity_input_max', 'hide_woocommerce_quantity_input', 10, 2 ); | |
function hide_woocommerce_quantity_input( $quantity, $product ) { | |
// only on the product page | |
if ( ! is_product() ) { | |
return $quantity; | |
} | |
return 1; | |
} |
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
add_filter( 'facebook_for_woocommerce_integration_pixel_enabled', '__return_false' ); |