Changeset 2572213
- Timestamp:
- 07/26/2021 10:11:34 AM (5 years ago)
- Location:
- custom-conditions-for-woocommerce/trunk
- Files:
-
- 5 edited
-
custom-conditions-for-woocommerce.php (modified) (2 diffs)
-
includes/class-ccw-includes.php (modified) (1 diff)
-
public/class-ccw-conditions.php (modified) (4 diffs)
-
public/class-ccw-public.php (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
custom-conditions-for-woocommerce/trunk/custom-conditions-for-woocommerce.php
r2565440 r2572213 12 12 * Plugin URI: https://wordpress.org/plugins/custom-conditions-for-woocommerce 13 13 * Description: If you want quickly to show/hide/rename most of the functionalities in WooCommerce, this is the right plugin. 14 * Version: 1.0. 214 * Version: 1.0.3 15 15 * Requires at least: 4.6 16 16 * Requires PHP: 7.4 … … 54 54 include CCW_PLUGIN_PATH . '/includes/class-ccw-includes.php'; 55 55 } 56 57 56 } 58 57 -
custom-conditions-for-woocommerce/trunk/includes/class-ccw-includes.php
r2565121 r2572213 11 11 if ( ! class_exists( 'Ccw_Includes' ) ) { 12 12 class Ccw_Includes { 13 14 13 public function __construct() {} 15 14 } -
custom-conditions-for-woocommerce/trunk/public/class-ccw-conditions.php
r2565121 r2572213 10 10 11 11 include CCW_PLUGIN_PATH . '/admin/api/class-ccw-settings.php'; 12 include CCW_PLUGIN_PATH . '/public/class-ccw-public.php'; 12 13 if ( ! class_exists( 'Ccw_Conditions' ) ) { 13 14 14 class Ccw_Conditions {15 class Ccw_Conditions extends Ccw_Public { 15 16 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>'; 16 19 17 20 public function __construct() { 21 parent::__construct(); 18 22 $this->api = new Ccw_Settings(); 19 23 … … 65 69 if ( $this->api->ccw_options_check( 'card_button_archive' ) == 1 && is_shop() ) { 66 70 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 } 67 76 } 68 77 } … … 74 83 if ( $this->api->ccw_options_check( 'card_button_single' ) == 1 ) { 75 84 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; 76 88 } 77 89 } … … 83 95 if ( $this->api->ccw_options_check( 'card_button_category' ) == 1 && is_product_category() ) { 84 96 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 86 102 } 87 103 -
custom-conditions-for-woocommerce/trunk/public/class-ccw-public.php
r2565121 r2572213 14 14 include CCW_PLUGIN_PATH . '/public/class-ccw-conditions.php'; 15 15 } 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 } 16 20 } 17 21 -
custom-conditions-for-woocommerce/trunk/readme.txt
r2565440 r2572213 5 5 Tested up to: 5.8 6 6 Requires PHP: 7.4 7 Stable tag: 1.0. 27 Stable tag: 1.0.3 8 8 Donate link: https://mlab-studio.com 9 9 License: GPLv3 or later License … … 71 71 = Can I use Custom Conditions For WooCommerce plugin with any WordPress theme? = 72 72 73 Y ou 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.73 Yes, the Custom Conditions for WooCommerce plugin is compatible with all of the themes. 74 74 75 75 = I don't see the changes for Google prices = … … 83 83 == Changelog == 84 84 85 = [ 1.0.3 ] - 2021.07.26 = 86 * Compatibility with all of the themes 87 85 88 = [ 1.0.0 ] - 2021.07.09 = 86 89 * Plugin created and published 87 90 88 91 == Upgrade Notice == 89 Plugin created and published 92 Tested compatability with all of the themes
Note: See TracChangeset
for help on using the changeset viewer.