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
let allFAicons = [ | |
'fas fa-ad', | |
'fas fa-address-book', | |
'fas fa-address-card', | |
'fas fa-adjust', | |
'fas fa-air-freshener', | |
'fas fa-align-center', | |
'fas fa-align-justify', | |
'fas fa-align-left', | |
'fas fa-align-right', |
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
// ==UserScript== | |
// @name WordPress.org Escalate to PAs | |
// @description Check if this is a forum revie | |
// @include https://*.wordpress.org/support/topic/* | |
// @include https://*.wordpress.org/support/view/* | |
// @include https://wordpress.org/support/topic/* | |
// @include https://wordpress.org/support/view/* | |
// @require https://code.jquery.com/jquery-1.11.0.min.js | |
// ==/UserScript== |
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
/* | |
Removes "schedule_failed_order_event" handler which marks the booking as unpaid after | |
an order fails and expires the booking after an hour. | |
In place of the above handle, the below snippet adds a custom handler that updates the booking status to "in-cart" | |
such that customer can retry payment for the booking. | |
*/ | |
remove_action('woocommerce_order_status_failed', 'schedule_failed_order_event'); |
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
/* Remove WooCommerce On Hold emails sent to Vendors */ | |
add_action( 'woocommerce_email', 'unhook_vendor_new_order_email_if_order_is_on_hold' ); | |
function unhook_vendor_new_order_email_if_order_is_on_hold( $email_class ) { | |
remove_action( 'woocommerce_order_status_pending_to_on-hold_notification', array( $email_class->emails['WC_Product_Vendors_Order_Email_To_Vendor'], 'trigger' ) ); | |
} |
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 | |
/** | |
* Create new bookings page. | |
*/ | |
class WC_Bookings_Create { | |
/** | |
* Stores errors. | |
* | |
* @var array |
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
function remove_tab_7252021 ($tabs){ | |
unset($tabs['bookings_templates']); | |
return($tabs); | |
} | |
add_filter('woocommerce_product_data_tabs', 'remove_tab_7252021', 10, 1); |
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
add_action( 'wp_footer', 'bookable_product_script_js'); | |
function bookable_product_script_js() { | |
global $product; | |
// Only on single bookable products | |
if( is_product() && $product->is_type('booking')) : | |
?> | |
<script type='text/javascript'> | |
var interval = setInterval(checkifDateisLoaded, 500); // set booking calendar load time | |
function checkifDateisLoaded() { | |
const datetobeselected = document.querySelector("[title='This date is available']"); |