Changeset 3257744
- Timestamp:
- 03/18/2025 11:12:18 AM (13 months ago)
- Location:
- birthday/trunk
- Files:
-
- 3 edited
-
birthday.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
src/Plugin.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
birthday/trunk/birthday.php
r3229170 r3257744 4 4 * Plugin Name: Birthday 5 5 * Description: Enhance your customer experience with WooCommerce Birthday and start offering personalized birthday promotions! 6 * Version: 1.5. 46 * Version: 1.5.5 7 7 * Requires Plugins: woocommerce 8 8 * Author: Mini Plugins … … 60 60 define( 'BIRTHDAY_PLUGIN_FILE', __FILE__ ); 61 61 define( 'BIRTHDAY_PLUGIN_PATH', __DIR__ ); 62 define( 'BIRTHDAY_VERSION', '1.5. 4' );62 define( 'BIRTHDAY_VERSION', '1.5.5' ); 63 63 require_once __DIR__ . '/src/Plugin.php'; 64 64 /** -
birthday/trunk/readme.txt
r3229170 r3257744 4 4 Requires at least: 6.0 5 5 Tested up to: 6.7 6 Stable tag: 1.5. 46 Stable tag: 1.5.5 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 48 48 == Changelog == 49 49 50 = 1.5.5 - 3/18/2025 = 51 * New - Flatpickr for date field 52 50 53 = 1.5.4 - 1/27/2024 = 51 54 * Tweak - Freemius SDK update -
birthday/trunk/src/Plugin.php
r3229170 r3257744 55 55 56 56 /** 57 * Add Flatpickr for the date field. 58 */ 59 public function flatpickr() { 60 wp_enqueue_style('flatpickr', plugins_url( 'assets/flatpickr.min.css', BIRTHDAY_PLUGIN_FILE ), [], BIRTHDAY_VERSION ); 61 wp_enqueue_script('flatpickr', plugins_url( 'assets/flatpickr.min.js', BIRTHDAY_PLUGIN_FILE ), array('jquery'), BIRTHDAY_VERSION, false); 62 63 ?> 64 <script> 65 jQuery(document).ready(function($) { 66 $('#billing_birthday, #account_birthday').flatpickr(); 67 }); 68 </script> 69 <?php 70 } 71 72 /** 57 73 * Load Localisation files. 58 74 * … … 158 174 public function add_birthday_field_to_checkout( $fields ) { 159 175 176 $this->flatpickr(); 177 160 178 $fields['billing_birthday'] = array( 161 179 'type' => 'date', 162 180 'label' => apply_filters( 'birthday_for_woocommerce_checkout_label', __( 'Birthday', 'birthday' ) ), 163 'description' => apply_filters( 'birthday_for_woocommerce_checkout_description', __( ' Enter your birthday in case you\'d like to receive cool gifts, discounts etc. from us in your birthday', 'birthday' ) ),181 'description' => apply_filters( 'birthday_for_woocommerce_checkout_description', __( '', 'birthday' ) ), 164 182 'class' => array( 'form-row-wide' ), 165 183 'autocomplete' => 'birthday', … … 182 200 public function add_birthday_field_to_customer_billing_address( $fields ) { 183 201 202 $this->flatpickr(); 203 184 204 $fields['billing']['fields']['billing_birthday'] = array( 185 205 'label' => __( 'Birthday', 'birthday' ), … … 197 217 public function add_birthday_field_to_account_page() { 198 218 219 $this->flatpickr(); 220 199 221 $user_id = get_current_user_id(); 200 222 $user_birthday = get_user_meta( $user_id, 'billing_birthday', true );
Note: See TracChangeset
for help on using the changeset viewer.