Plugin Directory

Changeset 3343245


Ignore:
Timestamp:
08/12/2025 03:44:25 AM (8 months ago)
Author:
themesflat
Message:

update

Location:
themesflat-addons-for-elementor
Files:
253 added
32 edited

Legend:

Unmodified
Added
Removed
  • themesflat-addons-for-elementor/tags/2.2.2/post-format/options.php

    r3158487 r3343245  
    335335                }
    336336            }
     337
     338            // if ( isset( $_REQUEST ) && isset( $_REQUEST['_themesflat_options'] ) ) {
     339            //     $datas = stripslashes_deep( $_REQUEST['_themesflat_options'] );
     340               
     341            //     if ( 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     342            //         foreach ($datas as $key => $value ) {
     343                   
     344            //             $order = wc_get_order( $post_id );
     345            //             if ( $order ) {
     346            //                 $order->update_meta_data( $key, $value );
     347            //                 $order->save();
     348            //             }
     349            //         }
     350            //     } else {
     351            //         foreach ($datas as $key => $value ) {
     352            //             update_post_meta( $post_id, $key, $value );
     353            //         }
     354            //     }
     355            // }
     356
    337357        }
    338358        public function page_meta_box() {
  • themesflat-addons-for-elementor/tags/2.2.2/readme.txt

    r3341328 r3343245  
    55Tested up to: 6.7
    66Requires PHP: 5.2
    7 Stable tag: 2.2.8
     7Stable tag: 2.2.9
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • themesflat-addons-for-elementor/tags/2.2.2/tf-function.php

    r3158487 r3343245  
    9696        update_post_meta( $post_id, '_tf_flashsale_text', $tf_flashsale_text);
    9797        update_post_meta( $post_id, '_tf_flashsale_text_2', $tf_flashsale_text_2);
     98
     99        // if ( 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     100        //     $order = wc_get_order( $post_id ); // Get the order
     101        //     if ( $order ) {
     102        //         $order->update_meta_data( '_tf_flashsale_text', $tf_flashsale_text );
     103        //         $order->update_meta_data( '_tf_flashsale_text_2', $tf_flashsale_text_2 );
     104        //         $order->save();
     105        //     }
     106        // } else {
     107        //     // HPOS is not enabled, use the old method
     108        //     update_post_meta( $post_id, '_tf_flashsale_text', $tf_flashsale_text );
     109        //     update_post_meta( $post_id, '_tf_flashsale_text_2', $tf_flashsale_text_2 );
     110        // }
    98111    }
    99112    add_action( 'woocommerce_process_product_meta', 'tf_save_metabox_of_general_tab');
     
    158171    }
    159172}
     173
    160174
    161175/* Pagination Woo */
  • themesflat-addons-for-elementor/tags/2.2.2/themesflat-addons-for-elementor.php

    r3341328 r3343245  
    55Author: Themesflat
    66Author URI: http://themesflat-addons.com/
    7 Version: 2.2.8
     7Version: 2.2.9
    88Text Domain: themesflat-addons-for-elementor
    99Domain Path: /languages
     
    6363        load_plugin_textdomain( 'themesflat-addons-for-elementor', false, basename( dirname( __FILE__ ) ) . '/languages' );
    6464    }
     65   
    6566
    6667    public function init() {
     
    9091        }*/
    9192
     93
     94           
     95        add_action( 'before_woocommerce_init', function() {
     96            if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
     97                \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
     98            }
     99        } );
    92100       
    93101        require_once( __DIR__ . '/shortcode.php' );
     
    512520        if ( class_exists( 'YITH_WCWL' ) ) {
    513521
    514             if(tf_opt_get_option('wd_woo_wishlist_count') === false || tf_opt_get_option('wd_woo_wishlist_count') === 'on') {
    515                 require_once( __DIR__ . '/widgets/widget-wishlist-count.php' );
    516                 \Elementor\Plugin::instance()->widgets_manager->register( new \TFWishlistCount_Widget_Free() );
    517             } elseif (tf_opt_get_option('wd_woo_wishlist_count') !== 'on' ) {
     522            // if(tf_opt_get_option('wd_woo_wishlist_count') === false || tf_opt_get_option('wd_woo_wishlist_count') === 'on') {
     523            //     require_once( __DIR__ . '/widgets/widget-wishlist-count.php' );
     524            //     \Elementor\Plugin::instance()->widgets_manager->register( new \TFWishlistCount_Widget_Free() );
     525            // } elseif (tf_opt_get_option('wd_woo_wishlist_count') !== 'on' ) {
    518526   
    519             }
     527            // }
    520528           
    521529        }
     
    932940    }
    933941
     942    // public function tf_header_footer_save_meta( $post_id ) {
     943    //     if ( 'order' === get_post_type( $post_id ) && 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     944    //         $order = wc_get_order( $post_id );
     945    //         if ( $order ) {
     946    //             if ( isset( $_POST['tfhf_template_type'] ) ) {
     947    //                 $order->update_meta_data( 'tfhf_template_type', esc_attr( $_POST['tfhf_template_type'] ) );
     948    //             }
     949
     950    //             $target_locations = self::get_format_rule_value( $_POST, 'tfhf-target-rules-location' );
     951    //             $order->update_meta_data( 'tfhf_template_include_locations', $target_locations );
     952
     953    //             $target_exclusion = self::get_format_rule_value( $_POST, 'tfhf-target-rules-exclusion' );
     954    //             $order->update_meta_data( 'tfhf_template_exclude_locations', $target_exclusion );
     955
     956    //             $order->save();
     957    //         }
     958    //     } else {
     959    //         if ( isset( $_POST['tfhf_template_type'] ) ) {
     960    //             update_post_meta( $post_id, 'tfhf_template_type', esc_attr( $_POST['tfhf_template_type'] ) );
     961    //         }
     962
     963    //         if ( ! isset( $_POST['tfhf_meta_nounce'] ) || ! wp_verify_nonce( $_POST['tfhf_meta_nounce'], 'tfhf_meta_nounce' ) ) {
     964    //             return;
     965    //         }
     966           
     967    //         if ( ! current_user_can( 'edit_posts' ) ) {
     968    //             return;
     969    //         }
     970
     971    //         $target_locations = self::get_format_rule_value( $_POST, 'tfhf-target-rules-location' );
     972    //         update_post_meta( $post_id, 'tfhf_template_include_locations', $target_locations );
     973
     974    //         $target_exclusion = self::get_format_rule_value( $_POST, 'tfhf-target-rules-exclusion' );       
     975    //         update_post_meta( $post_id, 'tfhf_template_exclude_locations', $target_exclusion );
     976    //     }
     977
     978    //     return false;
     979    // }
     980
     981
    934982    public function tf_header_footer_load_canvas_template( $single_template ) {
    935983        global $post;
  • themesflat-addons-for-elementor/tags/2.2.3/post-format/options.php

    r3189192 r3343245  
    335335                }
    336336            }
     337
     338            // if ( isset( $_REQUEST ) && isset( $_REQUEST['_themesflat_options'] ) ) {
     339            //     $datas = stripslashes_deep( $_REQUEST['_themesflat_options'] );
     340               
     341            //     if ( 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     342            //         foreach ($datas as $key => $value ) {
     343                   
     344            //             $order = wc_get_order( $post_id );
     345            //             if ( $order ) {
     346            //                 $order->update_meta_data( $key, $value );
     347            //                 $order->save();
     348            //             }
     349            //         }
     350            //     } else {
     351            //         foreach ($datas as $key => $value ) {
     352            //             update_post_meta( $post_id, $key, $value );
     353            //         }
     354            //     }
     355            // }
     356
    337357        }
    338358        public function page_meta_box() {
  • themesflat-addons-for-elementor/tags/2.2.3/readme.txt

    r3341328 r3343245  
    55Tested up to: 6.7
    66Requires PHP: 5.2
    7 Stable tag: 2.2.8
     7Stable tag: 2.2.9
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • themesflat-addons-for-elementor/tags/2.2.3/tf-function.php

    r3189192 r3343245  
    9696        update_post_meta( $post_id, '_tf_flashsale_text', $tf_flashsale_text);
    9797        update_post_meta( $post_id, '_tf_flashsale_text_2', $tf_flashsale_text_2);
     98
     99        // if ( 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     100        //     $order = wc_get_order( $post_id ); // Get the order
     101        //     if ( $order ) {
     102        //         $order->update_meta_data( '_tf_flashsale_text', $tf_flashsale_text );
     103        //         $order->update_meta_data( '_tf_flashsale_text_2', $tf_flashsale_text_2 );
     104        //         $order->save();
     105        //     }
     106        // } else {
     107        //     // HPOS is not enabled, use the old method
     108        //     update_post_meta( $post_id, '_tf_flashsale_text', $tf_flashsale_text );
     109        //     update_post_meta( $post_id, '_tf_flashsale_text_2', $tf_flashsale_text_2 );
     110        // }
    98111    }
    99112    add_action( 'woocommerce_process_product_meta', 'tf_save_metabox_of_general_tab');
     
    158171    }
    159172}
     173
    160174
    161175/* Pagination Woo */
  • themesflat-addons-for-elementor/tags/2.2.3/themesflat-addons-for-elementor.php

    r3341328 r3343245  
    55Author: Themesflat
    66Author URI: http://themesflat-addons.com/
    7 Version: 2.2.8
     7Version: 2.2.9
    88Text Domain: themesflat-addons-for-elementor
    99Domain Path: /languages
     
    6363        load_plugin_textdomain( 'themesflat-addons-for-elementor', false, basename( dirname( __FILE__ ) ) . '/languages' );
    6464    }
     65   
    6566
    6667    public function init() {
     
    9091        }*/
    9192
     93
     94           
     95        add_action( 'before_woocommerce_init', function() {
     96            if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
     97                \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
     98            }
     99        } );
    92100       
    93101        require_once( __DIR__ . '/shortcode.php' );
     
    512520        if ( class_exists( 'YITH_WCWL' ) ) {
    513521
    514             if(tf_opt_get_option('wd_woo_wishlist_count') === false || tf_opt_get_option('wd_woo_wishlist_count') === 'on') {
    515                 require_once( __DIR__ . '/widgets/widget-wishlist-count.php' );
    516                 \Elementor\Plugin::instance()->widgets_manager->register( new \TFWishlistCount_Widget_Free() );
    517             } elseif (tf_opt_get_option('wd_woo_wishlist_count') !== 'on' ) {
     522            // if(tf_opt_get_option('wd_woo_wishlist_count') === false || tf_opt_get_option('wd_woo_wishlist_count') === 'on') {
     523            //     require_once( __DIR__ . '/widgets/widget-wishlist-count.php' );
     524            //     \Elementor\Plugin::instance()->widgets_manager->register( new \TFWishlistCount_Widget_Free() );
     525            // } elseif (tf_opt_get_option('wd_woo_wishlist_count') !== 'on' ) {
    518526   
    519             }
     527            // }
    520528           
    521529        }
     
    932940    }
    933941
     942    // public function tf_header_footer_save_meta( $post_id ) {
     943    //     if ( 'order' === get_post_type( $post_id ) && 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     944    //         $order = wc_get_order( $post_id );
     945    //         if ( $order ) {
     946    //             if ( isset( $_POST['tfhf_template_type'] ) ) {
     947    //                 $order->update_meta_data( 'tfhf_template_type', esc_attr( $_POST['tfhf_template_type'] ) );
     948    //             }
     949
     950    //             $target_locations = self::get_format_rule_value( $_POST, 'tfhf-target-rules-location' );
     951    //             $order->update_meta_data( 'tfhf_template_include_locations', $target_locations );
     952
     953    //             $target_exclusion = self::get_format_rule_value( $_POST, 'tfhf-target-rules-exclusion' );
     954    //             $order->update_meta_data( 'tfhf_template_exclude_locations', $target_exclusion );
     955
     956    //             $order->save();
     957    //         }
     958    //     } else {
     959    //         if ( isset( $_POST['tfhf_template_type'] ) ) {
     960    //             update_post_meta( $post_id, 'tfhf_template_type', esc_attr( $_POST['tfhf_template_type'] ) );
     961    //         }
     962
     963    //         if ( ! isset( $_POST['tfhf_meta_nounce'] ) || ! wp_verify_nonce( $_POST['tfhf_meta_nounce'], 'tfhf_meta_nounce' ) ) {
     964    //             return;
     965    //         }
     966           
     967    //         if ( ! current_user_can( 'edit_posts' ) ) {
     968    //             return;
     969    //         }
     970
     971    //         $target_locations = self::get_format_rule_value( $_POST, 'tfhf-target-rules-location' );
     972    //         update_post_meta( $post_id, 'tfhf_template_include_locations', $target_locations );
     973
     974    //         $target_exclusion = self::get_format_rule_value( $_POST, 'tfhf-target-rules-exclusion' );       
     975    //         update_post_meta( $post_id, 'tfhf_template_exclude_locations', $target_exclusion );
     976    //     }
     977
     978    //     return false;
     979    // }
     980
     981
    934982    public function tf_header_footer_load_canvas_template( $single_template ) {
    935983        global $post;
  • themesflat-addons-for-elementor/tags/2.2.4/post-format/options.php

    r3202736 r3343245  
    335335                }
    336336            }
     337
     338            // if ( isset( $_REQUEST ) && isset( $_REQUEST['_themesflat_options'] ) ) {
     339            //     $datas = stripslashes_deep( $_REQUEST['_themesflat_options'] );
     340               
     341            //     if ( 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     342            //         foreach ($datas as $key => $value ) {
     343                   
     344            //             $order = wc_get_order( $post_id );
     345            //             if ( $order ) {
     346            //                 $order->update_meta_data( $key, $value );
     347            //                 $order->save();
     348            //             }
     349            //         }
     350            //     } else {
     351            //         foreach ($datas as $key => $value ) {
     352            //             update_post_meta( $post_id, $key, $value );
     353            //         }
     354            //     }
     355            // }
     356
    337357        }
    338358        public function page_meta_box() {
  • themesflat-addons-for-elementor/tags/2.2.4/readme.txt

    r3341328 r3343245  
    55Tested up to: 6.7
    66Requires PHP: 5.2
    7 Stable tag: 2.2.8
     7Stable tag: 2.2.9
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • themesflat-addons-for-elementor/tags/2.2.4/tf-function.php

    r3202736 r3343245  
    9696        update_post_meta( $post_id, '_tf_flashsale_text', $tf_flashsale_text);
    9797        update_post_meta( $post_id, '_tf_flashsale_text_2', $tf_flashsale_text_2);
     98
     99        // if ( 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     100        //     $order = wc_get_order( $post_id ); // Get the order
     101        //     if ( $order ) {
     102        //         $order->update_meta_data( '_tf_flashsale_text', $tf_flashsale_text );
     103        //         $order->update_meta_data( '_tf_flashsale_text_2', $tf_flashsale_text_2 );
     104        //         $order->save();
     105        //     }
     106        // } else {
     107        //     // HPOS is not enabled, use the old method
     108        //     update_post_meta( $post_id, '_tf_flashsale_text', $tf_flashsale_text );
     109        //     update_post_meta( $post_id, '_tf_flashsale_text_2', $tf_flashsale_text_2 );
     110        // }
    98111    }
    99112    add_action( 'woocommerce_process_product_meta', 'tf_save_metabox_of_general_tab');
     
    158171    }
    159172}
     173
    160174
    161175/* Pagination Woo */
  • themesflat-addons-for-elementor/tags/2.2.4/themesflat-addons-for-elementor.php

    r3341328 r3343245  
    55Author: Themesflat
    66Author URI: http://themesflat-addons.com/
    7 Version: 2.2.8
     7Version: 2.2.9
    88Text Domain: themesflat-addons-for-elementor
    99Domain Path: /languages
     
    6363        load_plugin_textdomain( 'themesflat-addons-for-elementor', false, basename( dirname( __FILE__ ) ) . '/languages' );
    6464    }
     65   
    6566
    6667    public function init() {
     
    9091        }*/
    9192
     93
     94           
     95        add_action( 'before_woocommerce_init', function() {
     96            if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
     97                \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
     98            }
     99        } );
    92100       
    93101        require_once( __DIR__ . '/shortcode.php' );
     
    512520        if ( class_exists( 'YITH_WCWL' ) ) {
    513521
    514             if(tf_opt_get_option('wd_woo_wishlist_count') === false || tf_opt_get_option('wd_woo_wishlist_count') === 'on') {
    515                 require_once( __DIR__ . '/widgets/widget-wishlist-count.php' );
    516                 \Elementor\Plugin::instance()->widgets_manager->register( new \TFWishlistCount_Widget_Free() );
    517             } elseif (tf_opt_get_option('wd_woo_wishlist_count') !== 'on' ) {
     522            // if(tf_opt_get_option('wd_woo_wishlist_count') === false || tf_opt_get_option('wd_woo_wishlist_count') === 'on') {
     523            //     require_once( __DIR__ . '/widgets/widget-wishlist-count.php' );
     524            //     \Elementor\Plugin::instance()->widgets_manager->register( new \TFWishlistCount_Widget_Free() );
     525            // } elseif (tf_opt_get_option('wd_woo_wishlist_count') !== 'on' ) {
    518526   
    519             }
     527            // }
    520528           
    521529        }
     
    932940    }
    933941
     942    // public function tf_header_footer_save_meta( $post_id ) {
     943    //     if ( 'order' === get_post_type( $post_id ) && 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     944    //         $order = wc_get_order( $post_id );
     945    //         if ( $order ) {
     946    //             if ( isset( $_POST['tfhf_template_type'] ) ) {
     947    //                 $order->update_meta_data( 'tfhf_template_type', esc_attr( $_POST['tfhf_template_type'] ) );
     948    //             }
     949
     950    //             $target_locations = self::get_format_rule_value( $_POST, 'tfhf-target-rules-location' );
     951    //             $order->update_meta_data( 'tfhf_template_include_locations', $target_locations );
     952
     953    //             $target_exclusion = self::get_format_rule_value( $_POST, 'tfhf-target-rules-exclusion' );
     954    //             $order->update_meta_data( 'tfhf_template_exclude_locations', $target_exclusion );
     955
     956    //             $order->save();
     957    //         }
     958    //     } else {
     959    //         if ( isset( $_POST['tfhf_template_type'] ) ) {
     960    //             update_post_meta( $post_id, 'tfhf_template_type', esc_attr( $_POST['tfhf_template_type'] ) );
     961    //         }
     962
     963    //         if ( ! isset( $_POST['tfhf_meta_nounce'] ) || ! wp_verify_nonce( $_POST['tfhf_meta_nounce'], 'tfhf_meta_nounce' ) ) {
     964    //             return;
     965    //         }
     966           
     967    //         if ( ! current_user_can( 'edit_posts' ) ) {
     968    //             return;
     969    //         }
     970
     971    //         $target_locations = self::get_format_rule_value( $_POST, 'tfhf-target-rules-location' );
     972    //         update_post_meta( $post_id, 'tfhf_template_include_locations', $target_locations );
     973
     974    //         $target_exclusion = self::get_format_rule_value( $_POST, 'tfhf-target-rules-exclusion' );       
     975    //         update_post_meta( $post_id, 'tfhf_template_exclude_locations', $target_exclusion );
     976    //     }
     977
     978    //     return false;
     979    // }
     980
     981
    934982    public function tf_header_footer_load_canvas_template( $single_template ) {
    935983        global $post;
  • themesflat-addons-for-elementor/tags/2.2.5/post-format/options.php

    r3215859 r3343245  
    335335                }
    336336            }
     337
     338            // if ( isset( $_REQUEST ) && isset( $_REQUEST['_themesflat_options'] ) ) {
     339            //     $datas = stripslashes_deep( $_REQUEST['_themesflat_options'] );
     340               
     341            //     if ( 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     342            //         foreach ($datas as $key => $value ) {
     343                   
     344            //             $order = wc_get_order( $post_id );
     345            //             if ( $order ) {
     346            //                 $order->update_meta_data( $key, $value );
     347            //                 $order->save();
     348            //             }
     349            //         }
     350            //     } else {
     351            //         foreach ($datas as $key => $value ) {
     352            //             update_post_meta( $post_id, $key, $value );
     353            //         }
     354            //     }
     355            // }
     356
    337357        }
    338358        public function page_meta_box() {
  • themesflat-addons-for-elementor/tags/2.2.5/readme.txt

    r3341328 r3343245  
    55Tested up to: 6.7
    66Requires PHP: 5.2
    7 Stable tag: 2.2.8
     7Stable tag: 2.2.9
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • themesflat-addons-for-elementor/tags/2.2.5/tf-function.php

    r3215859 r3343245  
    9696        update_post_meta( $post_id, '_tf_flashsale_text', $tf_flashsale_text);
    9797        update_post_meta( $post_id, '_tf_flashsale_text_2', $tf_flashsale_text_2);
     98
     99        // if ( 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     100        //     $order = wc_get_order( $post_id ); // Get the order
     101        //     if ( $order ) {
     102        //         $order->update_meta_data( '_tf_flashsale_text', $tf_flashsale_text );
     103        //         $order->update_meta_data( '_tf_flashsale_text_2', $tf_flashsale_text_2 );
     104        //         $order->save();
     105        //     }
     106        // } else {
     107        //     // HPOS is not enabled, use the old method
     108        //     update_post_meta( $post_id, '_tf_flashsale_text', $tf_flashsale_text );
     109        //     update_post_meta( $post_id, '_tf_flashsale_text_2', $tf_flashsale_text_2 );
     110        // }
    98111    }
    99112    add_action( 'woocommerce_process_product_meta', 'tf_save_metabox_of_general_tab');
     
    158171    }
    159172}
     173
    160174
    161175/* Pagination Woo */
  • themesflat-addons-for-elementor/tags/2.2.5/themesflat-addons-for-elementor.php

    r3341328 r3343245  
    55Author: Themesflat
    66Author URI: http://themesflat-addons.com/
    7 Version: 2.2.8
     7Version: 2.2.9
    88Text Domain: themesflat-addons-for-elementor
    99Domain Path: /languages
     
    6363        load_plugin_textdomain( 'themesflat-addons-for-elementor', false, basename( dirname( __FILE__ ) ) . '/languages' );
    6464    }
     65   
    6566
    6667    public function init() {
     
    9091        }*/
    9192
     93
     94           
     95        add_action( 'before_woocommerce_init', function() {
     96            if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
     97                \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
     98            }
     99        } );
    92100       
    93101        require_once( __DIR__ . '/shortcode.php' );
     
    512520        if ( class_exists( 'YITH_WCWL' ) ) {
    513521
    514             if(tf_opt_get_option('wd_woo_wishlist_count') === false || tf_opt_get_option('wd_woo_wishlist_count') === 'on') {
    515                 require_once( __DIR__ . '/widgets/widget-wishlist-count.php' );
    516                 \Elementor\Plugin::instance()->widgets_manager->register( new \TFWishlistCount_Widget_Free() );
    517             } elseif (tf_opt_get_option('wd_woo_wishlist_count') !== 'on' ) {
     522            // if(tf_opt_get_option('wd_woo_wishlist_count') === false || tf_opt_get_option('wd_woo_wishlist_count') === 'on') {
     523            //     require_once( __DIR__ . '/widgets/widget-wishlist-count.php' );
     524            //     \Elementor\Plugin::instance()->widgets_manager->register( new \TFWishlistCount_Widget_Free() );
     525            // } elseif (tf_opt_get_option('wd_woo_wishlist_count') !== 'on' ) {
    518526   
    519             }
     527            // }
    520528           
    521529        }
     
    932940    }
    933941
     942    // public function tf_header_footer_save_meta( $post_id ) {
     943    //     if ( 'order' === get_post_type( $post_id ) && 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     944    //         $order = wc_get_order( $post_id );
     945    //         if ( $order ) {
     946    //             if ( isset( $_POST['tfhf_template_type'] ) ) {
     947    //                 $order->update_meta_data( 'tfhf_template_type', esc_attr( $_POST['tfhf_template_type'] ) );
     948    //             }
     949
     950    //             $target_locations = self::get_format_rule_value( $_POST, 'tfhf-target-rules-location' );
     951    //             $order->update_meta_data( 'tfhf_template_include_locations', $target_locations );
     952
     953    //             $target_exclusion = self::get_format_rule_value( $_POST, 'tfhf-target-rules-exclusion' );
     954    //             $order->update_meta_data( 'tfhf_template_exclude_locations', $target_exclusion );
     955
     956    //             $order->save();
     957    //         }
     958    //     } else {
     959    //         if ( isset( $_POST['tfhf_template_type'] ) ) {
     960    //             update_post_meta( $post_id, 'tfhf_template_type', esc_attr( $_POST['tfhf_template_type'] ) );
     961    //         }
     962
     963    //         if ( ! isset( $_POST['tfhf_meta_nounce'] ) || ! wp_verify_nonce( $_POST['tfhf_meta_nounce'], 'tfhf_meta_nounce' ) ) {
     964    //             return;
     965    //         }
     966           
     967    //         if ( ! current_user_can( 'edit_posts' ) ) {
     968    //             return;
     969    //         }
     970
     971    //         $target_locations = self::get_format_rule_value( $_POST, 'tfhf-target-rules-location' );
     972    //         update_post_meta( $post_id, 'tfhf_template_include_locations', $target_locations );
     973
     974    //         $target_exclusion = self::get_format_rule_value( $_POST, 'tfhf-target-rules-exclusion' );       
     975    //         update_post_meta( $post_id, 'tfhf_template_exclude_locations', $target_exclusion );
     976    //     }
     977
     978    //     return false;
     979    // }
     980
     981
    934982    public function tf_header_footer_load_canvas_template( $single_template ) {
    935983        global $post;
  • themesflat-addons-for-elementor/tags/2.2.6/post-format/options.php

    r3268208 r3343245  
    335335                }
    336336            }
     337
     338            // if ( isset( $_REQUEST ) && isset( $_REQUEST['_themesflat_options'] ) ) {
     339            //     $datas = stripslashes_deep( $_REQUEST['_themesflat_options'] );
     340               
     341            //     if ( 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     342            //         foreach ($datas as $key => $value ) {
     343                   
     344            //             $order = wc_get_order( $post_id );
     345            //             if ( $order ) {
     346            //                 $order->update_meta_data( $key, $value );
     347            //                 $order->save();
     348            //             }
     349            //         }
     350            //     } else {
     351            //         foreach ($datas as $key => $value ) {
     352            //             update_post_meta( $post_id, $key, $value );
     353            //         }
     354            //     }
     355            // }
     356
    337357        }
    338358        public function page_meta_box() {
  • themesflat-addons-for-elementor/tags/2.2.6/readme.txt

    r3341328 r3343245  
    55Tested up to: 6.7
    66Requires PHP: 5.2
    7 Stable tag: 2.2.8
     7Stable tag: 2.2.9
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • themesflat-addons-for-elementor/tags/2.2.6/tf-function.php

    r3268208 r3343245  
    9696        update_post_meta( $post_id, '_tf_flashsale_text', $tf_flashsale_text);
    9797        update_post_meta( $post_id, '_tf_flashsale_text_2', $tf_flashsale_text_2);
     98
     99        // if ( 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     100        //     $order = wc_get_order( $post_id ); // Get the order
     101        //     if ( $order ) {
     102        //         $order->update_meta_data( '_tf_flashsale_text', $tf_flashsale_text );
     103        //         $order->update_meta_data( '_tf_flashsale_text_2', $tf_flashsale_text_2 );
     104        //         $order->save();
     105        //     }
     106        // } else {
     107        //     // HPOS is not enabled, use the old method
     108        //     update_post_meta( $post_id, '_tf_flashsale_text', $tf_flashsale_text );
     109        //     update_post_meta( $post_id, '_tf_flashsale_text_2', $tf_flashsale_text_2 );
     110        // }
    98111    }
    99112    add_action( 'woocommerce_process_product_meta', 'tf_save_metabox_of_general_tab');
     
    158171    }
    159172}
     173
    160174
    161175/* Pagination Woo */
  • themesflat-addons-for-elementor/tags/2.2.6/themesflat-addons-for-elementor.php

    r3341328 r3343245  
    55Author: Themesflat
    66Author URI: http://themesflat-addons.com/
    7 Version: 2.2.8
     7Version: 2.2.9
    88Text Domain: themesflat-addons-for-elementor
    99Domain Path: /languages
     
    6363        load_plugin_textdomain( 'themesflat-addons-for-elementor', false, basename( dirname( __FILE__ ) ) . '/languages' );
    6464    }
     65   
    6566
    6667    public function init() {
     
    9091        }*/
    9192
     93
     94           
     95        add_action( 'before_woocommerce_init', function() {
     96            if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
     97                \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
     98            }
     99        } );
    92100       
    93101        require_once( __DIR__ . '/shortcode.php' );
     
    512520        if ( class_exists( 'YITH_WCWL' ) ) {
    513521
    514             if(tf_opt_get_option('wd_woo_wishlist_count') === false || tf_opt_get_option('wd_woo_wishlist_count') === 'on') {
    515                 require_once( __DIR__ . '/widgets/widget-wishlist-count.php' );
    516                 \Elementor\Plugin::instance()->widgets_manager->register( new \TFWishlistCount_Widget_Free() );
    517             } elseif (tf_opt_get_option('wd_woo_wishlist_count') !== 'on' ) {
     522            // if(tf_opt_get_option('wd_woo_wishlist_count') === false || tf_opt_get_option('wd_woo_wishlist_count') === 'on') {
     523            //     require_once( __DIR__ . '/widgets/widget-wishlist-count.php' );
     524            //     \Elementor\Plugin::instance()->widgets_manager->register( new \TFWishlistCount_Widget_Free() );
     525            // } elseif (tf_opt_get_option('wd_woo_wishlist_count') !== 'on' ) {
    518526   
    519             }
     527            // }
    520528           
    521529        }
     
    932940    }
    933941
     942    // public function tf_header_footer_save_meta( $post_id ) {
     943    //     if ( 'order' === get_post_type( $post_id ) && 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     944    //         $order = wc_get_order( $post_id );
     945    //         if ( $order ) {
     946    //             if ( isset( $_POST['tfhf_template_type'] ) ) {
     947    //                 $order->update_meta_data( 'tfhf_template_type', esc_attr( $_POST['tfhf_template_type'] ) );
     948    //             }
     949
     950    //             $target_locations = self::get_format_rule_value( $_POST, 'tfhf-target-rules-location' );
     951    //             $order->update_meta_data( 'tfhf_template_include_locations', $target_locations );
     952
     953    //             $target_exclusion = self::get_format_rule_value( $_POST, 'tfhf-target-rules-exclusion' );
     954    //             $order->update_meta_data( 'tfhf_template_exclude_locations', $target_exclusion );
     955
     956    //             $order->save();
     957    //         }
     958    //     } else {
     959    //         if ( isset( $_POST['tfhf_template_type'] ) ) {
     960    //             update_post_meta( $post_id, 'tfhf_template_type', esc_attr( $_POST['tfhf_template_type'] ) );
     961    //         }
     962
     963    //         if ( ! isset( $_POST['tfhf_meta_nounce'] ) || ! wp_verify_nonce( $_POST['tfhf_meta_nounce'], 'tfhf_meta_nounce' ) ) {
     964    //             return;
     965    //         }
     966           
     967    //         if ( ! current_user_can( 'edit_posts' ) ) {
     968    //             return;
     969    //         }
     970
     971    //         $target_locations = self::get_format_rule_value( $_POST, 'tfhf-target-rules-location' );
     972    //         update_post_meta( $post_id, 'tfhf_template_include_locations', $target_locations );
     973
     974    //         $target_exclusion = self::get_format_rule_value( $_POST, 'tfhf-target-rules-exclusion' );       
     975    //         update_post_meta( $post_id, 'tfhf_template_exclude_locations', $target_exclusion );
     976    //     }
     977
     978    //     return false;
     979    // }
     980
     981
    934982    public function tf_header_footer_load_canvas_template( $single_template ) {
    935983        global $post;
  • themesflat-addons-for-elementor/tags/2.2.7/post-format/options.php

    r3309499 r3343245  
    335335                }
    336336            }
     337
     338            // if ( isset( $_REQUEST ) && isset( $_REQUEST['_themesflat_options'] ) ) {
     339            //     $datas = stripslashes_deep( $_REQUEST['_themesflat_options'] );
     340               
     341            //     if ( 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     342            //         foreach ($datas as $key => $value ) {
     343                   
     344            //             $order = wc_get_order( $post_id );
     345            //             if ( $order ) {
     346            //                 $order->update_meta_data( $key, $value );
     347            //                 $order->save();
     348            //             }
     349            //         }
     350            //     } else {
     351            //         foreach ($datas as $key => $value ) {
     352            //             update_post_meta( $post_id, $key, $value );
     353            //         }
     354            //     }
     355            // }
     356
    337357        }
    338358        public function page_meta_box() {
  • themesflat-addons-for-elementor/tags/2.2.7/readme.txt

    r3341328 r3343245  
    55Tested up to: 6.7
    66Requires PHP: 5.2
    7 Stable tag: 2.2.8
     7Stable tag: 2.2.9
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • themesflat-addons-for-elementor/tags/2.2.7/tf-function.php

    r3309499 r3343245  
    9696        update_post_meta( $post_id, '_tf_flashsale_text', $tf_flashsale_text);
    9797        update_post_meta( $post_id, '_tf_flashsale_text_2', $tf_flashsale_text_2);
     98
     99        // if ( 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     100        //     $order = wc_get_order( $post_id ); // Get the order
     101        //     if ( $order ) {
     102        //         $order->update_meta_data( '_tf_flashsale_text', $tf_flashsale_text );
     103        //         $order->update_meta_data( '_tf_flashsale_text_2', $tf_flashsale_text_2 );
     104        //         $order->save();
     105        //     }
     106        // } else {
     107        //     // HPOS is not enabled, use the old method
     108        //     update_post_meta( $post_id, '_tf_flashsale_text', $tf_flashsale_text );
     109        //     update_post_meta( $post_id, '_tf_flashsale_text_2', $tf_flashsale_text_2 );
     110        // }
    98111    }
    99112    add_action( 'woocommerce_process_product_meta', 'tf_save_metabox_of_general_tab');
     
    158171    }
    159172}
     173
    160174
    161175/* Pagination Woo */
  • themesflat-addons-for-elementor/tags/2.2.7/themesflat-addons-for-elementor.php

    r3341328 r3343245  
    55Author: Themesflat
    66Author URI: http://themesflat-addons.com/
    7 Version: 2.2.8
     7Version: 2.2.9
    88Text Domain: themesflat-addons-for-elementor
    99Domain Path: /languages
     
    6363        load_plugin_textdomain( 'themesflat-addons-for-elementor', false, basename( dirname( __FILE__ ) ) . '/languages' );
    6464    }
     65   
    6566
    6667    public function init() {
     
    9091        }*/
    9192
     93
     94           
     95        add_action( 'before_woocommerce_init', function() {
     96            if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
     97                \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
     98            }
     99        } );
    92100       
    93101        require_once( __DIR__ . '/shortcode.php' );
     
    512520        if ( class_exists( 'YITH_WCWL' ) ) {
    513521
    514             if(tf_opt_get_option('wd_woo_wishlist_count') === false || tf_opt_get_option('wd_woo_wishlist_count') === 'on') {
    515                 require_once( __DIR__ . '/widgets/widget-wishlist-count.php' );
    516                 \Elementor\Plugin::instance()->widgets_manager->register( new \TFWishlistCount_Widget_Free() );
    517             } elseif (tf_opt_get_option('wd_woo_wishlist_count') !== 'on' ) {
     522            // if(tf_opt_get_option('wd_woo_wishlist_count') === false || tf_opt_get_option('wd_woo_wishlist_count') === 'on') {
     523            //     require_once( __DIR__ . '/widgets/widget-wishlist-count.php' );
     524            //     \Elementor\Plugin::instance()->widgets_manager->register( new \TFWishlistCount_Widget_Free() );
     525            // } elseif (tf_opt_get_option('wd_woo_wishlist_count') !== 'on' ) {
    518526   
    519             }
     527            // }
    520528           
    521529        }
     
    932940    }
    933941
     942    // public function tf_header_footer_save_meta( $post_id ) {
     943    //     if ( 'order' === get_post_type( $post_id ) && 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     944    //         $order = wc_get_order( $post_id );
     945    //         if ( $order ) {
     946    //             if ( isset( $_POST['tfhf_template_type'] ) ) {
     947    //                 $order->update_meta_data( 'tfhf_template_type', esc_attr( $_POST['tfhf_template_type'] ) );
     948    //             }
     949
     950    //             $target_locations = self::get_format_rule_value( $_POST, 'tfhf-target-rules-location' );
     951    //             $order->update_meta_data( 'tfhf_template_include_locations', $target_locations );
     952
     953    //             $target_exclusion = self::get_format_rule_value( $_POST, 'tfhf-target-rules-exclusion' );
     954    //             $order->update_meta_data( 'tfhf_template_exclude_locations', $target_exclusion );
     955
     956    //             $order->save();
     957    //         }
     958    //     } else {
     959    //         if ( isset( $_POST['tfhf_template_type'] ) ) {
     960    //             update_post_meta( $post_id, 'tfhf_template_type', esc_attr( $_POST['tfhf_template_type'] ) );
     961    //         }
     962
     963    //         if ( ! isset( $_POST['tfhf_meta_nounce'] ) || ! wp_verify_nonce( $_POST['tfhf_meta_nounce'], 'tfhf_meta_nounce' ) ) {
     964    //             return;
     965    //         }
     966           
     967    //         if ( ! current_user_can( 'edit_posts' ) ) {
     968    //             return;
     969    //         }
     970
     971    //         $target_locations = self::get_format_rule_value( $_POST, 'tfhf-target-rules-location' );
     972    //         update_post_meta( $post_id, 'tfhf_template_include_locations', $target_locations );
     973
     974    //         $target_exclusion = self::get_format_rule_value( $_POST, 'tfhf-target-rules-exclusion' );       
     975    //         update_post_meta( $post_id, 'tfhf_template_exclude_locations', $target_exclusion );
     976    //     }
     977
     978    //     return false;
     979    // }
     980
     981
    934982    public function tf_header_footer_load_canvas_template( $single_template ) {
    935983        global $post;
  • themesflat-addons-for-elementor/tags/2.2.8/post-format/options.php

    r3340801 r3343245  
    335335                }
    336336            }
     337
     338            // if ( isset( $_REQUEST ) && isset( $_REQUEST['_themesflat_options'] ) ) {
     339            //     $datas = stripslashes_deep( $_REQUEST['_themesflat_options'] );
     340               
     341            //     if ( 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     342            //         foreach ($datas as $key => $value ) {
     343                   
     344            //             $order = wc_get_order( $post_id );
     345            //             if ( $order ) {
     346            //                 $order->update_meta_data( $key, $value );
     347            //                 $order->save();
     348            //             }
     349            //         }
     350            //     } else {
     351            //         foreach ($datas as $key => $value ) {
     352            //             update_post_meta( $post_id, $key, $value );
     353            //         }
     354            //     }
     355            // }
     356
    337357        }
    338358        public function page_meta_box() {
  • themesflat-addons-for-elementor/tags/2.2.8/readme.txt

    r3340801 r3343245  
    55Tested up to: 6.7
    66Requires PHP: 5.2
    7 Stable tag: 2.2.8
     7Stable tag: 2.2.9
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • themesflat-addons-for-elementor/tags/2.2.8/tf-function.php

    r3340801 r3343245  
    9696        update_post_meta( $post_id, '_tf_flashsale_text', $tf_flashsale_text);
    9797        update_post_meta( $post_id, '_tf_flashsale_text_2', $tf_flashsale_text_2);
     98
     99        // if ( 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     100        //     $order = wc_get_order( $post_id ); // Get the order
     101        //     if ( $order ) {
     102        //         $order->update_meta_data( '_tf_flashsale_text', $tf_flashsale_text );
     103        //         $order->update_meta_data( '_tf_flashsale_text_2', $tf_flashsale_text_2 );
     104        //         $order->save();
     105        //     }
     106        // } else {
     107        //     // HPOS is not enabled, use the old method
     108        //     update_post_meta( $post_id, '_tf_flashsale_text', $tf_flashsale_text );
     109        //     update_post_meta( $post_id, '_tf_flashsale_text_2', $tf_flashsale_text_2 );
     110        // }
    98111    }
    99112    add_action( 'woocommerce_process_product_meta', 'tf_save_metabox_of_general_tab');
     
    158171    }
    159172}
     173
    160174
    161175/* Pagination Woo */
  • themesflat-addons-for-elementor/tags/2.2.8/themesflat-addons-for-elementor.php

    r3340801 r3343245  
    55Author: Themesflat
    66Author URI: http://themesflat-addons.com/
    7 Version: 2.2.8
     7Version: 2.2.9
    88Text Domain: themesflat-addons-for-elementor
    99Domain Path: /languages
     
    6363        load_plugin_textdomain( 'themesflat-addons-for-elementor', false, basename( dirname( __FILE__ ) ) . '/languages' );
    6464    }
     65   
    6566
    6667    public function init() {
     
    9091        }*/
    9192
     93
     94           
     95        add_action( 'before_woocommerce_init', function() {
     96            if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
     97                \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
     98            }
     99        } );
    92100       
    93101        require_once( __DIR__ . '/shortcode.php' );
     
    512520        if ( class_exists( 'YITH_WCWL' ) ) {
    513521
    514             if(tf_opt_get_option('wd_woo_wishlist_count') === false || tf_opt_get_option('wd_woo_wishlist_count') === 'on') {
    515                 require_once( __DIR__ . '/widgets/widget-wishlist-count.php' );
    516                 \Elementor\Plugin::instance()->widgets_manager->register( new \TFWishlistCount_Widget_Free() );
    517             } elseif (tf_opt_get_option('wd_woo_wishlist_count') !== 'on' ) {
     522            // if(tf_opt_get_option('wd_woo_wishlist_count') === false || tf_opt_get_option('wd_woo_wishlist_count') === 'on') {
     523            //     require_once( __DIR__ . '/widgets/widget-wishlist-count.php' );
     524            //     \Elementor\Plugin::instance()->widgets_manager->register( new \TFWishlistCount_Widget_Free() );
     525            // } elseif (tf_opt_get_option('wd_woo_wishlist_count') !== 'on' ) {
    518526   
    519             }
     527            // }
    520528           
    521529        }
     
    932940    }
    933941
     942    // public function tf_header_footer_save_meta( $post_id ) {
     943    //     if ( 'order' === get_post_type( $post_id ) && 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     944    //         $order = wc_get_order( $post_id );
     945    //         if ( $order ) {
     946    //             if ( isset( $_POST['tfhf_template_type'] ) ) {
     947    //                 $order->update_meta_data( 'tfhf_template_type', esc_attr( $_POST['tfhf_template_type'] ) );
     948    //             }
     949
     950    //             $target_locations = self::get_format_rule_value( $_POST, 'tfhf-target-rules-location' );
     951    //             $order->update_meta_data( 'tfhf_template_include_locations', $target_locations );
     952
     953    //             $target_exclusion = self::get_format_rule_value( $_POST, 'tfhf-target-rules-exclusion' );
     954    //             $order->update_meta_data( 'tfhf_template_exclude_locations', $target_exclusion );
     955
     956    //             $order->save();
     957    //         }
     958    //     } else {
     959    //         if ( isset( $_POST['tfhf_template_type'] ) ) {
     960    //             update_post_meta( $post_id, 'tfhf_template_type', esc_attr( $_POST['tfhf_template_type'] ) );
     961    //         }
     962
     963    //         if ( ! isset( $_POST['tfhf_meta_nounce'] ) || ! wp_verify_nonce( $_POST['tfhf_meta_nounce'], 'tfhf_meta_nounce' ) ) {
     964    //             return;
     965    //         }
     966           
     967    //         if ( ! current_user_can( 'edit_posts' ) ) {
     968    //             return;
     969    //         }
     970
     971    //         $target_locations = self::get_format_rule_value( $_POST, 'tfhf-target-rules-location' );
     972    //         update_post_meta( $post_id, 'tfhf_template_include_locations', $target_locations );
     973
     974    //         $target_exclusion = self::get_format_rule_value( $_POST, 'tfhf-target-rules-exclusion' );       
     975    //         update_post_meta( $post_id, 'tfhf_template_exclude_locations', $target_exclusion );
     976    //     }
     977
     978    //     return false;
     979    // }
     980
     981
    934982    public function tf_header_footer_load_canvas_template( $single_template ) {
    935983        global $post;
  • themesflat-addons-for-elementor/trunk/post-format/options.php

    r3129138 r3343245  
    335335                }
    336336            }
     337
     338            // if ( isset( $_REQUEST ) && isset( $_REQUEST['_themesflat_options'] ) ) {
     339            //     $datas = stripslashes_deep( $_REQUEST['_themesflat_options'] );
     340               
     341            //     if ( 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     342            //         foreach ($datas as $key => $value ) {
     343                   
     344            //             $order = wc_get_order( $post_id );
     345            //             if ( $order ) {
     346            //                 $order->update_meta_data( $key, $value );
     347            //                 $order->save();
     348            //             }
     349            //         }
     350            //     } else {
     351            //         foreach ($datas as $key => $value ) {
     352            //             update_post_meta( $post_id, $key, $value );
     353            //         }
     354            //     }
     355            // }
     356
    337357        }
    338358        public function page_meta_box() {
  • themesflat-addons-for-elementor/trunk/readme.txt

    r3340804 r3343245  
    55Tested up to: 6.7
    66Requires PHP: 5.2
    7 Stable tag: 2.2.8
     7Stable tag: 2.2.9
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • themesflat-addons-for-elementor/trunk/tf-function.php

    r3129138 r3343245  
    9696        update_post_meta( $post_id, '_tf_flashsale_text', $tf_flashsale_text);
    9797        update_post_meta( $post_id, '_tf_flashsale_text_2', $tf_flashsale_text_2);
     98
     99        // if ( 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     100        //     $order = wc_get_order( $post_id ); // Get the order
     101        //     if ( $order ) {
     102        //         $order->update_meta_data( '_tf_flashsale_text', $tf_flashsale_text );
     103        //         $order->update_meta_data( '_tf_flashsale_text_2', $tf_flashsale_text_2 );
     104        //         $order->save();
     105        //     }
     106        // } else {
     107        //     // HPOS is not enabled, use the old method
     108        //     update_post_meta( $post_id, '_tf_flashsale_text', $tf_flashsale_text );
     109        //     update_post_meta( $post_id, '_tf_flashsale_text_2', $tf_flashsale_text_2 );
     110        // }
    98111    }
    99112    add_action( 'woocommerce_process_product_meta', 'tf_save_metabox_of_general_tab');
     
    158171    }
    159172}
     173
    160174
    161175/* Pagination Woo */
  • themesflat-addons-for-elementor/trunk/themesflat-addons-for-elementor.php

    r3340804 r3343245  
    55Author: Themesflat
    66Author URI: http://themesflat-addons.com/
    7 Version: 2.2.8
     7Version: 2.2.9
    88Text Domain: themesflat-addons-for-elementor
    99Domain Path: /languages
     
    6363        load_plugin_textdomain( 'themesflat-addons-for-elementor', false, basename( dirname( __FILE__ ) ) . '/languages' );
    6464    }
     65   
    6566
    6667    public function init() {
     
    9091        }*/
    9192
     93
     94           
     95        add_action( 'before_woocommerce_init', function() {
     96            if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
     97                \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
     98            }
     99        } );
    92100       
    93101        require_once( __DIR__ . '/shortcode.php' );
     
    512520        if ( class_exists( 'YITH_WCWL' ) ) {
    513521
    514             if(tf_opt_get_option('wd_woo_wishlist_count') === false || tf_opt_get_option('wd_woo_wishlist_count') === 'on') {
    515                 require_once( __DIR__ . '/widgets/widget-wishlist-count.php' );
    516                 \Elementor\Plugin::instance()->widgets_manager->register( new \TFWishlistCount_Widget_Free() );
    517             } elseif (tf_opt_get_option('wd_woo_wishlist_count') !== 'on' ) {
     522            // if(tf_opt_get_option('wd_woo_wishlist_count') === false || tf_opt_get_option('wd_woo_wishlist_count') === 'on') {
     523            //     require_once( __DIR__ . '/widgets/widget-wishlist-count.php' );
     524            //     \Elementor\Plugin::instance()->widgets_manager->register( new \TFWishlistCount_Widget_Free() );
     525            // } elseif (tf_opt_get_option('wd_woo_wishlist_count') !== 'on' ) {
    518526   
    519             }
     527            // }
    520528           
    521529        }
     
    932940    }
    933941
     942    // public function tf_header_footer_save_meta( $post_id ) {
     943    //     if ( 'order' === get_post_type( $post_id ) && 'yes' === get_option( 'woocommerce_enable_hpos', 'no' ) ) {
     944    //         $order = wc_get_order( $post_id );
     945    //         if ( $order ) {
     946    //             if ( isset( $_POST['tfhf_template_type'] ) ) {
     947    //                 $order->update_meta_data( 'tfhf_template_type', esc_attr( $_POST['tfhf_template_type'] ) );
     948    //             }
     949
     950    //             $target_locations = self::get_format_rule_value( $_POST, 'tfhf-target-rules-location' );
     951    //             $order->update_meta_data( 'tfhf_template_include_locations', $target_locations );
     952
     953    //             $target_exclusion = self::get_format_rule_value( $_POST, 'tfhf-target-rules-exclusion' );
     954    //             $order->update_meta_data( 'tfhf_template_exclude_locations', $target_exclusion );
     955
     956    //             $order->save();
     957    //         }
     958    //     } else {
     959    //         if ( isset( $_POST['tfhf_template_type'] ) ) {
     960    //             update_post_meta( $post_id, 'tfhf_template_type', esc_attr( $_POST['tfhf_template_type'] ) );
     961    //         }
     962
     963    //         if ( ! isset( $_POST['tfhf_meta_nounce'] ) || ! wp_verify_nonce( $_POST['tfhf_meta_nounce'], 'tfhf_meta_nounce' ) ) {
     964    //             return;
     965    //         }
     966           
     967    //         if ( ! current_user_can( 'edit_posts' ) ) {
     968    //             return;
     969    //         }
     970
     971    //         $target_locations = self::get_format_rule_value( $_POST, 'tfhf-target-rules-location' );
     972    //         update_post_meta( $post_id, 'tfhf_template_include_locations', $target_locations );
     973
     974    //         $target_exclusion = self::get_format_rule_value( $_POST, 'tfhf-target-rules-exclusion' );       
     975    //         update_post_meta( $post_id, 'tfhf_template_exclude_locations', $target_exclusion );
     976    //     }
     977
     978    //     return false;
     979    // }
     980
     981
    934982    public function tf_header_footer_load_canvas_template( $single_template ) {
    935983        global $post;
Note: See TracChangeset for help on using the changeset viewer.