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); |
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('pi_eqw_admin_email_id', function($email_id, $items, $email_obj){ | |
| if(isset($_POST['melyi-bemutatotermunk-van-kozelebb-onhoz']) && | |
| strpos($_POST['melyi-bemutatotermunk-van-kozelebb-onhoz'], 'Tatabánya') !== false ){ | |
| $email_id = 'email1@gmail.com'; | |
| } | |
| return $email_id; | |
| },10,3); |
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_enqueue_scripts', function () { | |
| $js = " | |
| jQuery(document).on('pi_add_to_enquiry_data', function(e, data){ | |
| if(jQuery('.wc-pao-addon-container').length == 0) return; | |
| jQuery('.wc-pao-addon-container').each(function(){ | |
| var label = jQuery('.wc-pao-addon-name', this).text().trim(); | |
| var price = jQuery('input', this).val().trim(); | |
| if(price != ''){ | |
| data['variation_detail'][label] = price; | |
| } |
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('pi_live_sales_notification_control_filter', function($show){ | |
| if( ! is_user_logged_in() ) { | |
| return false; | |
| } | |
| return $show; | |
| }); |
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_enqueue_scripts', function(){ | |
| if(function_exists('is_checkout') && is_checkout()){ | |
| wp_dequeue_script( 'wc-opayopi-dropin' ); | |
| wp_deregister_script( 'wc-opayopi-dropin' ); | |
| } | |
| }, PHP_INT_MAX ); |
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('custom_preparation_days_for_sat_sun')) { | |
| add_filter('pisol_dtt_setting_filter_pi_order_preparation_days', 'custom_preparation_days_for_sat_sun', PHP_INT_MAX); | |
| add_filter('pisol_dtt_setting_filter_pi_order_preparation_days_pickup', 'custom_preparation_days_for_sat_sun', PHP_INT_MAX); | |
| add_filter('pisol_dtt_setting_filter_pi_order_preparation_days_delivery', 'custom_preparation_days_for_sat_sun', PHP_INT_MAX); | |
| function custom_preparation_days_for_sat_sun($preparation_days) { | |
| $day = (int) wp_date('w'); // 0 => sunday, 1 => monday | |
| if($day == 0) return 2; |
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_disable_20221118 { | |
| private $disable_for_cats = []; | |
| function __construct($cats) { | |
| $this->disable_for_cats = is_array($cats) ? $cats : [$cats]; | |
| add_filter('pisol_disable_dtt_completely', [$this, 'disable']); | |
| } | |
| function disable($return) { | |
| $only_special_cat_present = true; |