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_filter( 'wc360_image_output', 'wcs_360_image_output' ); | |
function wcs_360_image_output( $content ) { | |
return $content; | |
} |
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_filter( 'wc360_shortcode_image_output', 'wcs_360_shortcode_image_output' ); | |
function wcs_360_shortcode_image_output( $content ) { | |
return $content; | |
} |
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
/* | |
* Snippet to display Order Barcodes on your site. | |
* Just copy the PHP Snippet to your template, and it will be displayed over there. | |
*/ | |
echo WC_Order_Barcodes()->display_barcode($order_id); |
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
/* | |
Modify the color styles of the WooCommerce Bookings datepicker calendar. | |
Add any/all of these styles to your theme's custom CSS, but be sure to change | |
the color hex codes to your choice. They're all black here. | |
*/ | |
/* Month header background color */ | |
#wc-bookings-booking-form .wc-bookings-date-picker .ui-datepicker-header { | |
background-color: #000000; | |
} |
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_filter( 'woocommerce_instagram_image_size', 'change_wci_size_used' ); | |
function change_wci_size_used() { | |
return 'thumbnail'; | |
} |
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
/** | |
* Code goes in theme functions.php | |
* | |
* In this example we're creating a booking 1 week after a booking is paid for. | |
* This does not create another order or payment, just an additional booking. | |
* $exact is false meaning if our slot is taken, the next available slot will be used. | |
* @link https://docs.woocommerce.com/document/creating-bookings-programatically/ | |
*/ | |
function auto_create_followup_booking( $booking_id ) { |
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
#amazon_addressbook_widget div, #amazon_wallet_widget div { | |
min-width: 260px !important; | |
} |
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
/** | |
* Will make the Bookings calender default to the month with the first available booking. | |
*/ | |
add_filter( 'wc_bookings_calendar_default_to_current_date', '__return_false' ); |
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
/** | |
* wc_bookings_summary_list_date is used to filter a booking's summary date. | |
* This example removes the end date for a multi-day booking. | |
* | |
* @param string $booking_date The formatted date that is displayed by default. | |
* @param int $booking_start Timestamp for the booking start time/date. | |
* @param int $booking_end Timestamp for the booking end time/date. | |
* @return string The modified date string. | |
*/ | |
function modify_summary_date_20170821( $booking_date, $booking_start, $booking_end ) { |
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 warranty_add_custom_statuses() { | |
if (! function_exists('warranty_get_statuses')) return; | |
// Statuses to add | |
$statuses = array('Custom Status 1', 'Custom Status 2'); | |
foreach ( $statuses as $status ) { | |
$term = get_term_by( 'name', $status, 'shop_warranty_status' ); | |
if (! $term ) { |