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 upcommingCalendarWeeks(){ | |
for ((j = 1 ; j < 52 ; j++)); do | |
mondayMonth=$(date -v-Sun -v+${j}w -v+Mon "+%b") | |
mon=$(date -v-Sun -v+${j}w -v+Mon "+%d") | |
fridayMonth=$(date -v-Sun -v+${j}w -v+Fri "+%b") | |
fri=$(date -v-Sun -v+${j}w -v+Fri "+%d") | |
echo "$mondayMonth $mon - $fridayMonth $fri" | |
done | |
} |
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
System status report | |
Sample: | |
` | |
### WordPress Environment ### | |
Home URL: https://woocommerce.com | |
Site URL: https://woocommerce.com | |
WC Version: 3.3.5 |
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
https://gist.github.com/dwainm/31fd57407b099bf9a6b35a2b9d85c16b |
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 Bookings Changelog *** | |
2018-05-23 - version 1.11.2 | |
* Update - Privacy policy notification. | |
* Update - Export/erasure hooks added. | |
* Update - WC 3.4 compatibility. | |
2018-04-24 - version 1.11.1 | |
* Fix - Booking Reminder Emails: Same-day Bookings Contain The Text 'tomorrow'. | |
* Fix - Calendar doesn't load the correct availability for different resources. |
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 | |
update_post_meta( $subscription_id, '_payfast_subscription_token', $token ); | |
update_post_meta( $subscription_id, '_payment_method', 'payfast' ); |
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 // << make sure to remove this `<?php` if you're copying this into your functions.php | |
// | |
// Your code goes below | |
// | |
/** Sensei Integration **/ | |
add_action( 'after_setup_theme', 'declare_sensei_support' ); | |
function declare_sensei_support() { | |
add_theme_support( 'sensei' ); | |
} |
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 | |
/** | |
* Bookings | |
*/ | |
add_action( 'init', function(){ | |
// WC_Stamps_API::get_client(); | |
//add_filter( 'wc_bookings_calendar_default_to_current_date', '__return_false' ); | |
//if ( defined( 'DOING_AJAX' ) || defined( 'DOING_CRON' ) ) return; | |
//booking_product_to_code_print_meta_booking(9454); die; |
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 | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
/** | |
* Class for the booking product type | |
*/ | |
class WC_Product_Booking extends WC_Product { | |
private $availability_rules = 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
<?php // do not include this fir line with php as it will break your site, it was only added for styling | |
add_action('admin_init','sensei_custom_code_reset_questions_asked'); | |
function sensei_custom_code_reset_questions_asked(){ | |
if( ! isset( $_POST['sensei_custom_code_reset_questions_asked'] ) | |
|| ! ( isset( $_POST['sensei_custom_code_reset_questions_asked_nonce'] ) | |
&& wp_verify_nonce( $_POST['sensei_custom_code_reset_questions_asked_nonce'], 'sensei_custom_code_reset_questions_asked_for_user' ) ) | |
){ |
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 | |
/** | |
* Base class for displaying a list of items in an ajaxified HTML table. | |
* | |
* @since 3.1.0 | |
* @access private | |
* | |
* @package WordPress | |
* @subpackage List_Table | |
*/ |
NewerOlder