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('retainful_recovery_redirect_url','retainful_recovery_redirect_url'); | |
function retainful_recovery_redirect_url($url){ | |
$url = wc_get_cart_url(); | |
return $url; | |
} |
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( 'graphql_register_types', function() { | |
$field_config = [ | |
'type' => 'String', | |
'description' => __('Elementor rendered content', 'wp-graphql'), | |
'args' => [ | |
'myArg' => [ | |
'type' => '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 | |
/* | |
Class Name: VI_WOO_LUCKY_WHEEL_Frontend_Frontend | |
Author: Andy Ha ([email protected]) | |
Author URI: http://villatheme.com | |
Copyright 2015 villatheme.com. All rights reserved. | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} |
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('rnoc_abandoned_cart_order_status','rnoc_abandoned_cart_order_status',10,2); | |
function rnoc_abandoned_cart_order_status($order_status,$order){ | |
if(in_array($order_status,array("failed"))){ | |
$order_status = "pending"; | |
} | |
return $order_status; | |
} |
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('woo_discount_rules_remove_event_woocommerce_before_calculate_totals', '__return_true'); | |
add_filter('woo_discount_rules_apply_rules_repeatedly', '__return_true'); |
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('woo_discount_rules_remove_event_woocommerce_before_calculate_totals', '__return_true'); | |
add_filter('woo_discount_rules_apply_rules_repeatedly', '__return_true'); |
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('rnoc_abandoned_cart_order_status','rnoc_abandoned_cart_order_status',10,2); | |
function rnoc_abandoned_cart_order_status($order_status,$order){ | |
if(in_array($order_status,array("cancelled","failed"))){ | |
$order_status = "pending"; | |
} | |
return $order_status; | |
} |
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 woo_discount_rules_exclude_cart_item_from_discount_method($excluded_products, $rule, $variants){ | |
$eligible_rule_id = 9999; // enter the rule ID that applies for downloadable product only | |
if(isset($rule->ID) && $rule->ID == $eligible_rule_id ) { | |
$query = new WC_Product_Query( array( | |
'downloadable' => false, | |
'return' => '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
function woo_discount_rules_exclude_cart_item_from_discount_method($skip, $cart_item){ | |
$product_ids_to_exclude = array(); | |
if(is_object($cart_item['data']) && method_exists($cart_item['data'], 'is_downloadable')) { | |
if(!$cart_item['data']->is_downloadable()) { | |
$skip = true; | |
} | |
} | |
return $skip; | |
} |
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 woo_discount_rules_accepted_taxonomy_for_category_method($taxonomy){ | |
$taxonomy[] = 'product_type'; | |
return $taxonomy; | |
} | |
add_filter('woo_discount_rules_accepted_taxonomy_for_category', 'woo_discount_rules_accepted_taxonomy_for_category_method', 10); | |
function woo_discount_rules_load_additional_taxonomy_method($categories, $product_id){ | |
$taxonomy_to_apply = 'product_type'; | |
$tags = get_the_terms( $product_id, $taxonomy_to_apply ); |
NewerOlder