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_dtt_custom_20250917 { | |
private static $instance = null; | |
const META_KEY = '_pisol_dtt_selected_categories'; | |
private function __construct() { | |
add_action( 'add_meta_boxes', [ $this, 'add_meta_box' ] ); | |
add_action( 'save_post', [ $this, 'save_meta' ] ); | |
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_admin_assets' ], PHP_INT_MAX ); | |
add_filter('pisol_dtt_get_location', [$this, 'add_location_categories'], 10, 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
use PISOL\AAOT\ADMIN\Conditions\Base_Condition; | |
class Shipping_Method_20250916 extends Base_Condition { | |
public function __construct() { | |
parent::__construct(); | |
} | |
public function get_id() { | |
return 'shipping_method_20250916'; | |
} |
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) { | |
$start_date = ''; | |
if (function_exists('WC') && isset(WC()->cart) && is_object(WC()->cart)) { | |
foreach (WC()->cart->get_cart() as $cart_item) { | |
$product_id = $cart_item['product_id']; | |
$variation_id = $cart_item['variation_id']; | |
if(!empty($variation_id)){ | |
$product_id = $variation_id; | |
} | |
if (class_exists('\PISOL\EDD\BASE\Product')) { |
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_Split_Shipping_20250910' ) ) { | |
class Pisol_Split_Shipping_20250910 { | |
private static $instance = null; | |
private $shipping_class_id = 280; // Replace with your shipping class ID | |
private function __construct() { | |
add_filter( 'woocommerce_cart_shipping_packages', [ $this, 'split_packages' ], 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
add_filter( 'woocommerce_shipping_packages', 'pisol_adjust_split_shipping', 20 ); | |
function pisol_adjust_split_shipping( $packages ) { | |
$target_method_id = 'pisol_extended_flat_shipping:4710'; | |
// Count packages containing the method | |
$count = 0; | |
foreach ( $packages as $pkg ) { | |
if ( isset( $pkg['rates'][ $target_method_id ] ) ) { | |
$count++; | |
} |
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_is_virtual', function( $is_virtual, $product ) { | |
$type = $product->get_type(); | |
if ( $type === 'bundle' ) { | |
return false; | |
} | |
return $is_virtual; | |
}, 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_shortcode( 'estimate_date_loop', function( $atts ) { | |
if ( isset( $atts['id'] ) ) { | |
$product = wc_get_product( intval( $atts['id'] ) ) ?: null; | |
} else { | |
global $product; | |
} | |
if ( ! ( $product instanceof WC_Product ) ) { | |
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_20250820{ | |
static $instance = null; | |
public static function get_instance() { | |
if ( is_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_package_rates', function( $rates, $package ) { | |
// Core method names to hide | |
$hide = array( 'flat_rate', 'free_shipping', 'local_pickup' ); | |
foreach ( $rates as $rate_id => $rate ) { | |
foreach ( $hide as $method ) { | |
if ( strpos( $rate_id, $method ) !== false ) { | |
unset( $rates[ $rate_id ] ); | |
} | |
} |
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
.ui-datepicker-calendar td a.ui-state-default { | |
background: green !important; | |
width:40px; | |
height:40px; | |
display:flex !important; | |
text-align:center !important; | |
justify-content:center; | |
align-items:center; | |
margin:auto; |
NewerOlder