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
| if(!class_exists('pisol_custom_steve_sproston_20210521')){ | |
| class pisol_custom_steve_sproston_20210521{ | |
| public $pickup_only_products; | |
| function __construct($product_ids){ | |
| // normalize to an array of unique integers | |
| $this->pickup_only_products = array_unique(array_map('intval', (array) $product_ids)); | |
| add_filter('pisol_dtt_setting_filter_pi_type', array($this, 'type')); | |
| } |
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 pi_custom_disable_date_time { | |
| const META_KEY = 'pi_dtt_custom_disable_date_time'; | |
| private static $instance = null; | |
| public static function get_instance() { | |
| if ( null === 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
| /* | |
| our all the setting has a filter applied on them like this pisol_dtt_setting_filter_{setting_key} | |
| */ | |
| add_filter('pisol_dtt_setting_filter_pi_pickup_days', function($days){ | |
| if (!is_user_logged_in()) { | |
| return $days; // guests have no role, leave the default untouched | |
| } | |
| $user = wp_get_current_user(); |
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
| if ( ! function_exists( 'pisol_strip_missing_amount_decimals_20260812' ) ) { | |
| function pisol_strip_missing_amount_decimals_20260812( $html ) { | |
| if ( empty( $html ) ) { | |
| return $html; | |
| } | |
| $result = preg_replace( | |
| '/(<span class="woocommerce-Price-amount amount"><bdi>.*?)\.\d{2}(<\/bdi><\/span>)/s', | |
| '$1$2', | |
| $html | |
| ); |
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_action( 'init', function() { | |
| global $wpdb; | |
| $wpdb->query( | |
| " | |
| UPDATE {$wpdb->postmeta} | |
| SET meta_value = '' | |
| WHERE meta_key IN ( | |
| 'out_of_stock_product_preparation_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
| class pisol_custom_20260731{ | |
| static $instance = null; | |
| public $format = 'Y/m/d'; | |
| public $today; | |
| public $type; | |
| public $holidays; | |
| public $allowed_dates; | |
| static function get_instance(){ | |
| if(self::$instance == null){ |
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_action( 'wp_footer', function() { | |
| if ( ! is_checkout() || is_order_received_page() ) { | |
| return; | |
| } | |
| ?> | |
| <script> | |
| jQuery(function($) { | |
| function toggleDeliveryDateBlock() { |
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_eqw_date_field_html', function ($html) { | |
| $tomorrow = wp_date('Y-m-d', strtotime('+1 day')); | |
| libxml_use_internal_errors(true); | |
| $dom = new DOMDocument(); | |
| $dom->loadHTML( | |
| mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'), |
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_paypal_payments_purchase_unit_from_wc_order', function ($purchase_unit, $order) { | |
| if (!$purchase_unit instanceof \WooCommerce\PayPalCommerce\ApiClient\Entity\PurchaseUnit || !$order instanceof \WC_Order) { | |
| return $purchase_unit; | |
| } | |
| $actual_total = (float)$order->get_total(); | |
| $new_money = new \WooCommerce\PayPalCommerce\ApiClient\Entity\Money( | |
| $actual_total, | |
| $order->get_currency() |
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_clone_checkbox{ | |
| static $instance = null; | |
| static $run = 0; | |
| static function get_instance(){ | |
| if(is_null(self::$instance)){ | |
| self::$instance = new self(); | |
| } |
NewerOlder