This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'woocommerce_payment_complete_order_status', 'wmg_auto_complete_virtual_orders', 10, 3 ); | |
/** | |
* Automatically complete orders with only virtual products | |
* | |
* @param string $payment_complete_status Order status used after an order payment is received | |
* @param int $order_id ID of the order being processed | |
* @param WC_Order $order Order object being processed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_load_scripts($hook) { | |
// create version codes | |
$my_js_ver = date("ymd-Gis", filemtime( get_stylesheet_directory() .'/js/myscript.js' )); | |
$my_css_ver = date("ymd-Gis", filemtime( get_stylesheet_directory() . '/style.css' )); | |
wp_enqueue_script( 'my-script-name', get_stylesheet_directory() . '/js/myscript.js', array(), $my_js_ver ); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined( 'ABSPATH' ) || exit; | |
/** | |
* Custom Rule: Order - Delivery Date | |
* | |
* This is an example of creating a custom date rule that uses a meta field as the date value. | |
* By extending the AutomateWoo\Rules\Abstract_Date class we can use the existing date comparison types with this custom rule. | |
* For more about date-based rules see: https://automatewoo.com/docs/rules/date-based-rules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.woocommerce form .show-password-input, .woocommerce-page form .show-password-input { | |
position: relative; | |
cursor: pointer; | |
} | |
.woocommerce form .show-password-input::after, .woocommerce-page form .show-password-input::after { | |
right: 0.7em; | |
top: 0.4em; | |
cursor: pointer; | |
position: absolute; |