Changeset 2286725
- Timestamp:
- 04/19/2020 11:01:25 AM (4 years ago)
- Location:
- woocommerce-variation-details-on-page-product
- Files:
-
- 36 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-variation-details-on-page-product/trunk/classes/class-mp-wc-vdopp-settings.php
r1610189 r2286725 11 11 12 12 public $plugin_id; 13 public $section_name;14 13 15 14 public function __construct() { 16 global $mp_wc_vdopp; 17 $this->plugin_id = $mp_wc_vdopp->plugin_prefix; 18 $this->section_name = &$this->plugin_id; 15 $this->plugin_id = 'mp_wc_vdopp'; 19 16 add_action( 'admin_init', array( $this, 'verify_first_use' ) ); 20 17 } … … 22 19 // Load the class 23 20 public function load() { 24 add_action( 'admin_init', array( $this, 'load_hooks' ) );25 }26 27 // Call for actions28 public function load_hooks() {29 21 add_filter( 'woocommerce_get_sections_products', array( &$this, 'add_settings_section' ) ); 30 22 add_action( 'woocommerce_get_settings_products', array( &$this, 'create_settings_page' ), 10, 2 ); … … 43 35 // Create Variations section 44 36 public function add_settings_section( $section ) { 45 $section[ $this-> section_name] = __( 'Variations', 'mp_wc_vdopp' );37 $section[ $this-> ] = __( 'Variations', 'mp_wc_vdopp' ); 46 38 return $section; 47 39 } … … 50 42 public function create_settings_page( $settings, $current_section ) { 51 43 52 if ( $current_section === $this-> section_name) {44 if ( $current_section === $this-> ) { 53 45 54 $settings = array();46 $settings = array(); 55 47 $settings[] = array( 56 'name' 57 'type' 58 'desc' => __( 'This plugin has predefined settings outside the box. If you feel comfortable, you are welcome to update data to meet your requirements.', 'mp_wc_vdopp' ) . '<p>' . __( '<strong>Important:</strong> Use a . to identify a class and a # to identify an id.', 'mp_wc_vdopp' ) . '</p>',48 'name' => __( 'WooCommerce Variation Details on Page Product', 'mp_wc_vdopp' ), 49 'type' => 'title', 50 'desc' , 59 51 ); 60 52 … … 77 69 78 70 $settings[] = array( 79 'name' 80 'id' 81 'type' 82 'desc' 71 'name' => __( 'Before size', 'mp_wc_vdopp' ), 72 'id' => $this->plugin_id . '_before_size', 73 'type' => 'text', 74 'desc' => __( 'Set text before size.', 'mp_wc_vdopp' ), 83 75 ); 84 76 85 77 $settings[] = array( 86 'name' 87 'id' 88 'type' 89 'desc' 78 'name' => __( 'Before weight', 'mp_wc_vdopp' ), 79 'id' => $this->plugin_id . '_before_weight', 80 'type' => 'text', 81 'desc' => __( 'Set text before weight.', 'mp_wc_vdopp' ), 90 82 ); 91 83 92 84 $settings[] = array( 93 'name' 94 'id' 95 'type' 96 'desc' 85 'name' => __( 'After size', 'mp_wc_vdopp' ), 86 'id' => $this->plugin_id . '_after_size', 87 'type' => 'text', 88 'desc' => __( 'Set text after size.', 'mp_wc_vdopp' ), 97 89 ); 98 90 99 91 $settings[] = array( 100 'name' 101 'id' 102 'type' 103 'desc' 92 'name' => __( 'After weight', 'mp_wc_vdopp' ), 93 'id' => $this->plugin_id . '_after_weight', 94 'type' => 'text', 95 'desc' => __( 'Set text after weight.', 'mp_wc_vdopp' ), 104 96 ); 105 97 106 98 $settings[] = array( 107 'type' => 'sectionend'99 'type' 108 100 ); 109 101 110 102 $settings[] = array( 111 'name' 112 'desc' 113 'type' => 'title'103 'name' => __( 'Donation', 'mp_wc_vdopp' ), 104 'desc' => __( 'Please, support further development of this plugin by buying the guy an extra dose of caffeine.', 'mp_wc_vdopp' ) . '<p><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=S626RA3BPS74S" target="_blank"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"></a></p>', 105 'type' 114 106 ); 115 107 } -
woocommerce-variation-details-on-page-product/trunk/package.json
r2258913 r2286725 1 1 { 2 2 "name": "woocommerce-variation-details-on-page-product", 3 "version": "3.4. 0",3 "version": "3.4.", 4 4 "description": "WooCommerce Variation Details on Page Product", 5 5 "main": "index.js", -
woocommerce-variation-details-on-page-product/trunk/readme.md
r2258913 r2286725 6 6 Requires at least: 4.3 and WooCommerce 2.4\ 7 7 Tested up to: 5.4.0\ 8 Stable tag: 3.4. 0\8 Stable tag: 3.4.\ 9 9 License: GPLv3 or later\ 10 10 License URI: http://www.opensource.org/licenses/gpl-license.php … … 41 41 ## Frequently Asked Questions 42 42 43 Q. Is there any shortcode that I can use to hook the details? 43 Q. Is there any shortcode that I can use to hook the details? 44 44 A. Now there is, hurray. Just use the shortcode `[mp_wc_vdopp_variations]`. 45 45 46 Q. After upgrading to version 2.0 I'm not able to show my details 46 Q. After upgrading to version 2.0 I'm not able to show my details 47 47 A. Due to internal changes, all of the previous definitions of attribute keys were lost. You should go to Variation settings' tab, within WooCommerce settings and define again which attributes you want to handle. 48 48 … … 57 57 58 58 ## Changelog 59 60 61 62 59 63 60 64 ### 3.4.0 -
woocommerce-variation-details-on-page-product/trunk/readme.txt
r2258913 r2286725 6 6 Requires at least: 4.3 and WooCommerce 2.4 7 7 Tested up to: 5.4.0 8 Stable tag: 3.4. 08 Stable tag: 3.4. 9 9 License: GPLv3 or later 10 10 License URI: http://www.opensource.org/licenses/gpl-license.php … … 57 57 58 58 ## Changelog 59 60 61 62 59 63 60 64 ### 3.4.0 -
woocommerce-variation-details-on-page-product/trunk/wc-attributes-on-page.php
r2258913 r2286725 5 5 Plugin URI: https://github.com/pereirinha/woocommerce-variation-details-on-page-product 6 6 Description: Display physical size and weight of product within product meta details. 7 Version: 3.4. 07 Version: 3.4. 8 8 Author: Marco Pereirinha 9 9 Author URI: http://www.linkedin.com/in/marcopereirinha … … 20 20 21 21 // Definition of version 22 const VERSION = '3.4. 0';22 const VERSION = '3.4.'; 23 23 const VERSION_OPTION_NAME = 'mp_wc_vdopp_version'; 24 24
Note: See TracChangeset
for help on using the changeset viewer.