Plugin Directory

Changeset 2572213


Ignore:
Timestamp:
07/26/2021 10:11:34 AM (5 years ago)
Author:
upss1988
Message:

1.0.3v

Location:
custom-conditions-for-woocommerce/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • custom-conditions-for-woocommerce/trunk/custom-conditions-for-woocommerce.php

    r2565440 r2572213  
    1212 * Plugin URI:        https://wordpress.org/plugins/custom-conditions-for-woocommerce
    1313 * Description:       If you want quickly to show/hide/rename most of the functionalities in WooCommerce, this is the right plugin.
    14  * Version:           1.0.2
     14 * Version:           1.0.3
    1515 * Requires at least: 4.6
    1616 * Requires PHP:      7.4
     
    5454                    include CCW_PLUGIN_PATH . '/includes/class-ccw-includes.php';
    5555                }
    56 
    5756            }
    5857
  • custom-conditions-for-woocommerce/trunk/includes/class-ccw-includes.php

    r2565121 r2572213  
    1111if ( ! class_exists( 'Ccw_Includes' ) ) {
    1212    class Ccw_Includes {
    13 
    1413        public function __construct() {}
    1514    }
  • custom-conditions-for-woocommerce/trunk/public/class-ccw-conditions.php

    r2565121 r2572213  
    1010
    1111include CCW_PLUGIN_PATH . '/admin/api/class-ccw-settings.php';
     12include CCW_PLUGIN_PATH . '/public/class-ccw-public.php';
    1213if ( ! class_exists( 'Ccw_Conditions' ) ) {
    1314
    14     class Ccw_Conditions {
     15    class Ccw_Conditions extends Ccw_Public {
    1516        public Ccw_Settings $api;
     17        public string $style_add_to_cart = '<style>.add_to_cart_button{display:none!important}</style>';
     18        public string $style_single_add_to_cart = '<style>.single_add_to_cart_button{display:none!important}</style>';
    1619
    1720        public function __construct() {
     21            parent::__construct();
    1822            $this->api = new Ccw_Settings();
    1923
     
    6569            if ( $this->api->ccw_options_check( 'card_button_archive' ) == 1 && is_shop() ) {
    6670                remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' );
     71
     72                // If the theme has custom hooks
     73                if ( is_shop() ) {
     74                    echo $this->style_add_to_cart;
     75                }
    6776            }
    6877        }
     
    7483            if ( $this->api->ccw_options_check( 'card_button_single' ) == 1 ) {
    7584                remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
     85
     86                // If the theme has custom hooks
     87                echo $this->style_single_add_to_cart;
    7688            }
    7789        }
     
    8395            if ( $this->api->ccw_options_check( 'card_button_category' ) == 1 && is_product_category() ) {
    8496                remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' );
    85             }
     97
     98                // If the theme has custom hooks
     99                echo $this->style_add_to_cart;
     100            }
     101
    86102        }
    87103
  • custom-conditions-for-woocommerce/trunk/public/class-ccw-public.php

    r2565121 r2572213  
    1414            include CCW_PLUGIN_PATH . '/public/class-ccw-conditions.php';
    1515        }
     16
     17        public function ccw_enqueue_public_styles() {
     18            wp_enqueue_style( 'ccw_public_css', plugins_url( '/assets/css/ccw_public_style.css', __FILE__ ) );
     19        }
    1620    }
    1721
  • custom-conditions-for-woocommerce/trunk/readme.txt

    r2565440 r2572213  
    55Tested up to: 5.8
    66Requires PHP: 7.4
    7 Stable tag: 1.0.2
     7Stable tag: 1.0.3
    88Donate link: https://mlab-studio.com
    99License: GPLv3 or later License
     
    7171= Can I use Custom Conditions For WooCommerce plugin with any WordPress theme? =
    7272
    73 You can use it with any theme, followed by WordPress coding standard since many themes use a custom WooCommerce hooks, and some functionalities from the plugin may not work.
     73Yes, the Custom Conditions for WooCommerce plugin is compatible with all of the themes.
    7474
    7575= I don't see the changes for Google prices =
     
    8383== Changelog ==
    8484
     85= [ 1.0.3 ] - 2021.07.26 =
     86* Compatibility with all of the themes
     87
    8588= [ 1.0.0 ] - 2021.07.09 =
    8689* Plugin created and published
    8790
    8891== Upgrade Notice ==
    89 Plugin created and published
     92Tested compatability with all of the themes
Note: See TracChangeset for help on using the changeset viewer.