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_filter('wfocu_offers_to_cancel_primary', function(){ | |
return [XXXXXX,XXXXX]; //replace with the offer IDs | |
}); |
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
class WFACP_Hide_Address_Fields_On_Virtual_Cart { | |
public function __construct() { | |
add_action( 'wfacp_internal_css', [ $this, 'add_js' ] ); | |
} | |
public function add_js() { |
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_filter( 'wfocu_offer_data', 'wfocu_custom_alter_price', 12, 3 ); | |
function wfocu_custom_alter_price( $output, $offer_data, $is_front ) { | |
$percentage_discount_on_order = 50; //put your dynamic percentage discount amount here | |
if ( true === $is_front ) { | |
foreach ( $output->products as &$product ) { | |
if ( is_a( $product->data, 'WC_Product' ) ) { | |
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_filter ( 'woocommerce_order_item_permalink' , '__return_false' ); | |
add_action( 'woocommerce_account_downloads_column_download-product','xlwcty_remove_hyper_link_from_download_product'); | |
function xlwcty_remove_hyper_link_from_download_product($download) | |
{ | |
echo esc_html( $download['product_name'] ); | |
} |
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( 'wfacp_internal_css', 'exute_custom_aero_js' ); | |
function exute_custom_aero_js() { | |
?> | |
<style> | |
@media (min-width: 992px)and (max-width: 1366px) { | |
.wfacp_collapsible_order_summary_wrap.wfacp_tablet.wfacp_mobile { | |
display: none; | |
} | |
} |
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( 'wfacp_print_cart_error_notice', '__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
add_filter( 'wfacp_assign_email_as_a_username', '__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( 'wfob_product_raw_data', function ( $raw_data, $product ) { | |
/** | |
* @var $product WC_Product | |
*/ | |
$raw_data['regular_price'] = $product->get_regular_price(); | |
$raw_data['price'] = $product->get_price(); | |
return $raw_data; |