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 | |
add_filter( 'wc_product_has_unique_sku', '__return_false' ); |
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 | |
add_filter( 'wcsatt_single_product_one_time_option_description', 'custom_one_time_purchase_string', 12, 2 ); | |
function custom_one_time_purchase_string( $none_string, $product ) { | |
// Alter the value of $none_string to use a custom string | |
$none_string = "ONE TIME - " . $product->get_price_html(); | |
return $none_string; | |
} |
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 | |
add_filter( 'woocommerce_adjust_non_base_location_prices', '__return_false' ); |
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 | |
add_filter('woocommerce_product_single_add_to_cart_text', 'override_modify_single_add_to_cart_text', 99); | |
function override_modify_single_add_to_cart_text( $product ) { | |
return 'OVERRIDE BUTTON TEXT'; | |
} |
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 | |
/** | |
* Email order details. | |
* | |
* @version 2.1.52 | |
* @since 2.0.0 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly |
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 | |
/* | |
* If an order is created and placed On Hold, keep the subscription Active | |
* If an order is changed to On Hold, change the subscription status to Active | |
* | |
* wcs_order_contains_subscription( $order, 'any' ) | any / parent / renewal / switch | |
*/ | |
add_action( 'woocommerce_order_status_changed', 'wcs_sub_active_order_onhold', 10, 4 ); |
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
DELETE FROM `wp_actionscheduler_actions` | |
WHERE `status` = 'complete' | |
DELETE FROM `wp_actionscheduler_actions` | |
WHERE `status` = 'failed' | |
DELETE FROM `wp_actionscheduler_actions` | |
WHERE `status` = 'pending' | |
DELETE FROM `wp_actionscheduler_actions` |
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 | |
add_action( 'woocommerce_cart_totals_before_shipping', 'local_pickup_order_comment_validation' ); | |
function local_pickup_order_comment_validation() { | |
$chosen_shipping = WC()->session->get( 'chosen_shipping_methods' )[0]; | |
$chosen_shipping = explode(':', $chosen_shipping); | |
if ( $chosen_shipping[0] == 'local_pickup' ){ | |
echo '<p style="font-weight:bold;border:1px solid #000;padding:4px;">Address must be entered into checkout for more shipping options.</p>'; | |
} | |
} |
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 | |
add_filter('woocommerce_account_menu_items', 'wcs_remove_subscription_tab'); | |
function wcs_remove_subscription_tab($menu_links) { | |
unset($menu_links['subscriptions']); | |
return $menu_links; | |
} |