Changeset 2428525
- Timestamp:
- 11/30/2020 11:34:18 AM (4 years ago)
- Location:
- multiple-external-product-urls-for-woocommerce
- Files:
-
- 8 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
multiple-external-product-urls-for-woocommerce/tags/1.2.0/README.txt
r2042987 r2428525 1 1 === Multiple external product URLs for WooCommerce === 2 2 Contributors: cmachu 3 Donate link: http://cmachowski.com4 Tags: woocommerce, external product, woo, external, product, product url 3 Author URI: https://cmachowski.com 4 Tags: woocommerce, external product, woo, external, product, product url, woocommerce external product, multiple external products, 5 5 Requires at least: 3.0.1 6 Tested up to: 5. 17 Stable tag: 1. 1.18 License: GPLv2 or late r6 Tested up to: 5.5 7 Stable tag: 1.2.0 8 License: GPLv2 or late 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 Donate link: https://paypal.me/cmachu 10 11 11 12 Plugins gives you ability to add multiple external product URLs on WooCommerce product edit page. … … 35 36 == Changelog == 36 37 38 = 1.2.0 = 39 * FIX: JS error on few WooCommerce versions 40 * FIX: PHP Fatal error on few WooCommerce versions 41 37 42 = 1.1.0 = 38 43 * ADD: Ability to switch on/off displaying additional external product buttons on category loops -
multiple-external-product-urls-for-woocommerce/tags/1.2.0/admin/class-mepu-woo-admin.php
r1933588 r2428525 63 63 public function enqueue_scripts() 64 64 { 65 wp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/mepu-woo-admin.js', array('jquery' ,'woocommerce_admin'), $this->version, false);65 wp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/mepu-woo-admin.js', array('jquery'), $this->version, false); 66 66 } 67 67 -
multiple-external-product-urls-for-woocommerce/tags/1.2.0/frontend/class-mepu-woo-frontend.php
r2042986 r2428525 46 46 * Initialize the class and set its properties. 47 47 * 48 * @param string $plugin_name The name of this plugin. 49 * @param string $version The version of this plugin. 48 50 * @since 1.0.0 49 * @param string $plugin_name The name of this plugin.50 * @param string $version The version of this plugin.51 51 */ 52 52 public function __construct($plugin_name, $version) … … 86 86 /** 87 87 * Add multiple external buttons to loop in category 88 * @since 1.1.089 88 * @param $buttons 90 89 * @param $product 91 90 * @param $args 92 91 * @return string 92 * @since 1.1.0 93 93 */ 94 public function render_mepu_buttons_loop($buttons, $product, $args )94 public function render_mepu_buttons_loop($buttons, $product, $args = []) 95 95 { 96 96 if (get_post_meta($product->get_id(), '_external_show_in_cat', true) && ('external' == $product->get_type())) { … … 118 118 { 119 119 global $product; 120 if ($product) { 121 if ($product->get_type() == 'external') { 122 $mepu_data = get_post_meta($product->get_id(), '_external_target_blank', true); 123 if ($mepu_data) { 124 ?> 125 <script> 126 if (jQuery('.cart')) { 127 jQuery('.cart').attr('target', '_blank'); 128 } 129 </script> 130 <?php 131 } 120 if ($product && $product->get_type() == 'external') { 121 $mepu_data = get_post_meta($product->get_id(), '_external_target_blank', true); 122 if ($mepu_data) { 123 ?> 124 <script> 125 if (jQuery('.cart')) { 126 jQuery('.cart').attr('target', '_blank'); 127 } 128 </script> 129 <?php 132 130 } 133 131 } 132 134 133 } 135 134 136 135 /** 137 136 * Adjust external product buttons on category loop 138 * @since 1.1.0139 137 * @param $args 140 138 * @param $product 141 139 * @return mixed 140 * @since 1.1.0 142 141 */ 143 142 public function adjust_cart_form_details_loop($args, $product) 144 143 { 145 if (get_post_meta($product->get_id(), '_external_show_in_cat', true) && get_post_meta($product->get_id(), '_external_target_blank', true)) { 146 $args['attributes']['target'] = '_blank'; 144 if(isset($args['attributes'])) { 145 if (get_post_meta($product->get_id(), '_external_show_in_cat', true) && get_post_meta($product->get_id(), '_external_target_blank', true)) { 146 $args['attributes']['target'] = '_blank'; 147 } 147 148 } 148 149 -
multiple-external-product-urls-for-woocommerce/tags/1.2.0/mepu-woo.php
r2042987 r2428525 28 28 * Rename this for your plugin and update it as you release new versions. 29 29 */ 30 define('MEPU_WOO_VERSION', '1. 1.1');30 define('MEPU_WOO_VERSION', '1.2.0'); 31 31 32 32 /** -
multiple-external-product-urls-for-woocommerce/trunk/README.txt
r2042987 r2428525 1 1 === Multiple external product URLs for WooCommerce === 2 2 Contributors: cmachu 3 Donate link: http://cmachowski.com4 Tags: woocommerce, external product, woo, external, product, product url 3 Author URI: https://cmachowski.com 4 Tags: woocommerce, external product, woo, external, product, product url, woocommerce external product, multiple external products, 5 5 Requires at least: 3.0.1 6 Tested up to: 5. 17 Stable tag: 1. 1.18 License: GPLv2 or late r6 Tested up to: 5.5 7 Stable tag: 1.2.0 8 License: GPLv2 or late 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 Donate link: https://paypal.me/cmachu 10 11 11 12 Plugins gives you ability to add multiple external product URLs on WooCommerce product edit page. … … 35 36 == Changelog == 36 37 38 = 1.2.0 = 39 * FIX: JS error on few WooCommerce versions 40 * FIX: PHP Fatal error on few WooCommerce versions 41 37 42 = 1.1.0 = 38 43 * ADD: Ability to switch on/off displaying additional external product buttons on category loops -
multiple-external-product-urls-for-woocommerce/trunk/admin/class-mepu-woo-admin.php
r1933588 r2428525 63 63 public function enqueue_scripts() 64 64 { 65 wp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/mepu-woo-admin.js', array('jquery' ,'woocommerce_admin'), $this->version, false);65 wp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/mepu-woo-admin.js', array('jquery'), $this->version, false); 66 66 } 67 67 -
multiple-external-product-urls-for-woocommerce/trunk/frontend/class-mepu-woo-frontend.php
r2042986 r2428525 46 46 * Initialize the class and set its properties. 47 47 * 48 * @param string $plugin_name The name of this plugin. 49 * @param string $version The version of this plugin. 48 50 * @since 1.0.0 49 * @param string $plugin_name The name of this plugin.50 * @param string $version The version of this plugin.51 51 */ 52 52 public function __construct($plugin_name, $version) … … 86 86 /** 87 87 * Add multiple external buttons to loop in category 88 * @since 1.1.089 88 * @param $buttons 90 89 * @param $product 91 90 * @param $args 92 91 * @return string 92 * @since 1.1.0 93 93 */ 94 public function render_mepu_buttons_loop($buttons, $product, $args )94 public function render_mepu_buttons_loop($buttons, $product, $args = []) 95 95 { 96 96 if (get_post_meta($product->get_id(), '_external_show_in_cat', true) && ('external' == $product->get_type())) { … … 118 118 { 119 119 global $product; 120 if ($product) { 121 if ($product->get_type() == 'external') { 122 $mepu_data = get_post_meta($product->get_id(), '_external_target_blank', true); 123 if ($mepu_data) { 124 ?> 125 <script> 126 if (jQuery('.cart')) { 127 jQuery('.cart').attr('target', '_blank'); 128 } 129 </script> 130 <?php 131 } 120 if ($product && $product->get_type() == 'external') { 121 $mepu_data = get_post_meta($product->get_id(), '_external_target_blank', true); 122 if ($mepu_data) { 123 ?> 124 <script> 125 if (jQuery('.cart')) { 126 jQuery('.cart').attr('target', '_blank'); 127 } 128 </script> 129 <?php 132 130 } 133 131 } 132 134 133 } 135 134 136 135 /** 137 136 * Adjust external product buttons on category loop 138 * @since 1.1.0139 137 * @param $args 140 138 * @param $product 141 139 * @return mixed 140 * @since 1.1.0 142 141 */ 143 142 public function adjust_cart_form_details_loop($args, $product) 144 143 { 145 if (get_post_meta($product->get_id(), '_external_show_in_cat', true) && get_post_meta($product->get_id(), '_external_target_blank', true)) { 146 $args['attributes']['target'] = '_blank'; 144 if(isset($args['attributes'])) { 145 if (get_post_meta($product->get_id(), '_external_show_in_cat', true) && get_post_meta($product->get_id(), '_external_target_blank', true)) { 146 $args['attributes']['target'] = '_blank'; 147 } 147 148 } 148 149 -
multiple-external-product-urls-for-woocommerce/trunk/mepu-woo.php
r2042987 r2428525 28 28 * Rename this for your plugin and update it as you release new versions. 29 29 */ 30 define('MEPU_WOO_VERSION', '1. 1.1');30 define('MEPU_WOO_VERSION', '1.2.0'); 31 31 32 32 /**
Note: See TracChangeset
for help on using the changeset viewer.