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
/** | |
* // Custom redirect for users after clicking 'return to shop' | |
**/ | |
add_filter('woocommerce_return_to_shop_redirect', 'lr_wc_return_to_shop_redirect'); | |
function lr_wc_return_to_shop_redirect( $redirect ) { | |
$redirect = '/products/donation/'; | |
return $redirect; | |
} |
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
function wtd_subscriptions_custom_price_string( $pricestring ) { | |
$newprice = str_replace( 'for 1 day', 'once', $pricestring ); | |
return $newprice; | |
} | |
add_filter( 'woocommerce_subscriptions_product_price_string', 'wtd_subscriptions_custom_price_string' ); | |
function lr_subscriptions_custom_price_string( $pricestring ) { | |
$newprice = str_replace( 'every day once', 'once', $pricestring ); | |
return $newprice; | |
} |
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
function wtd_remove_var_subscriptions_price() { | |
return ''; | |
} | |
add_filter( 'woocommerce_variable_subscription_price_html', 'wtd_remove_var_subscriptions_price' ); |
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
add_action( 'wc_pip_after_body', 'add_shipping_addresses_to_pip', 10, 4 ); | |
function add_shipping_addresses_to_pip( $type, $action, $document, $order ) { | |
global $wcms; | |
if ( 'invoice' == $type ) { | |
$wcms->order->display_order_shipping_addresses($order); | |
} | |
} |
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
public function validate_api_key_field( $key, $value ) { | |
if ( isset( $value ) && 20 < strlen( $value ) ) { | |
WC_Admin_Settings::add_error( esc_html__( 'Looks like you made a mistake with the API Key field. Make sure it isn't longer than 20 characters', 'woocommerce-integration-demo' ) ); | |
} | |
return $value; | |
} |
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
@media only screen and (max-width: 768px) { | |
.homepage-banner { | |
display: block; | |
} | |
} |
NewerOlder