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
| class pisol_acblw_germanize{ | |
| static $instance = null; | |
| public static function get_instance(){ | |
| if(self::$instance == null){ | |
| self::$instance = new self(); | |
| } | |
| return self::$instance; | |
| } |
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_get_cart_item_from_session', | |
| function ( $cart_item, $values ) { | |
| if ( isset( $values['donation_amount'] ) ) { | |
| $cart_item['donation_amount'] = $values['donation_amount']; | |
| $cart_item['is_donation'] = true; | |
| $cart_item['data']->set_price( | |
| (float) $values['donation_amount'] |
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
| class pisol_marp_disable_dtt_plugin_options_for_category{ | |
| public $disable_for_cat = array(19, 23); | |
| function __construct(){ | |
| add_filter('pisol_disable_dtt_completely', array($this, 'disableDateTimePlugin')); | |
| } | |
| function disableDateTimePlugin($value){ | |
| if(is_admin()) return; | |
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
| class pisol_custom_code_20251209{ | |
| public static $instance = null; | |
| public $saturday_next_day_cutoff_time = '12:30'; | |
| public static function get_instance() { | |
| if ( null === self::$instance ) { | |
| self::$instance = new self(); | |
| } | |
| return self::$instance; |
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('pisol_dtt_setting_filter_pi_next_day_delivery_cutoff_time', function($time) { | |
| // current_time('w') returns 0 (Sunday) through 6 (Saturday) in WP | |
| if ( (int) current_time( 'w' ) === 6 ) { | |
| return '12:30'; | |
| } | |
| return $time; | |
| }); |
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('pisol_dtt_date_sort', function($dates) { | |
| // Define restricted product categories | |
| $restricted_categories = array( 19, 22 ); | |
| // Check if products from restricted categories are in the cart | |
| $cart = WC()->cart->get_cart(); | |
| $has_restricted_category = false; | |
| if ( $cart ) { | |
| foreach ( $cart as $cart_item ) { |
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('pisol_edd_get_product_data', function($data, $object){ | |
| $orders = wc_get_orders([ | |
| 'status' => 'processing', | |
| 'limit' => -1, | |
| 'return' => 'ids', | |
| ]); | |
| $count = count($orders); |
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
| .pi-cod-deposit-container { | |
| padding: 20px 20px 20px 10px !important; | |
| } | |
| .pi-checkmark { | |
| display: inline-block !important; | |
| } | |
| .pi-cod-deposit-container input:checked+.pi-checkmark:after{ | |
| width: 24px; |
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
| class PISOL_Zero_Shipping_On_Fee { | |
| static $instance = null; | |
| public static function get_instance() { | |
| if ( null === self::$instance ) { | |
| self::$instance = new self(); | |
| } | |
| return self::$instance; | |
| } |
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_get_method_title', function($title, $item){ | |
| $method_id = $item->get_method_id(); | |
| $instance_id = $item->get_instance_id(); | |
| if($method_id === 'pisol_extended_flat_shipping'){ | |
| $title = get_the_title($instance_id); | |
| } | |
| return $title; | |
| }, PHP_INT_MAX, 2); |
NewerOlder