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
/* Display field labels and values in columns */ | |
span.pewc-summary-panel-product-name { | |
width: 60%; | |
display: inline-block; | |
} | |
span.pewc-summary-panel-product-value { | |
display: inline-block; | |
width: 30%; | |
} | |
td.pewc-summary-panel-price { |
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 | |
/** | |
* Bypass all transients | |
*/ | |
add_filter( 'pewc_disable_all_transients', '__return_true' ); |
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( 'unzip_file_use_ziparchive', '__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
<html> | |
<head> | |
<title>Product Add-Ons Ultimate REST API Tester</title> | |
</head> | |
<body> | |
<script src='wp-includes/js/jquery/jquery.min.js'></script> | |
<p>API Key: <input type="text" id="wc_api_key" value="" size="50"></p> | |
<p>API Secret: <input type="text" id="wc_api_secret" value="" size="50"></p> | |
<p>API Method: |
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 | |
/** | |
* Save cancelled roles field for variations | |
*/ | |
function prefix_save_product_variation( $variation_id, $index ) { | |
if( isset( $_POST['wcmo_product_sub_cancelled_roles'][$variation_id] ) ) { | |
update_post_meta( $variation_id, 'wcmo_product_sub_cancelled_roles', $_POST['wcmo_product_sub_cancelled_roles'][$variation_id] ); | |
} else { | |
delete_post_meta( $variation_id, 'wcmo_product_sub_cancelled_roles' ); |
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 | |
/** | |
* Filter restriction by page ID for user roles | |
*/ | |
function prefix_is_restricted_redirect( $is_restricted ) { | |
$restricted_page_ids = array( 2, 10 ); | |
if( is_page() ) { | |
$page_id = get_the_ID(); | |
if( in_array( $page_id, $restricted_page_ids ) ) { |
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 | |
/** | |
* Restrict access to pages by log-in status | |
*/ | |
function prefix_is_post_restricted( $is_restricted, $restricted_content ) { | |
// Edit the page IDs below | |
$restricted_page_ids = array( 2, 10 ); | |
if( is_page() ) { | |
$page_id = get_the_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
<?php | |
/** | |
* Allow more than one booking in the cart | |
*/ | |
function prefix_max_bookings_in_cart() { | |
return 99; | |
} | |
add_filter( 'bfwc_max_bookings_in_cart', 'prefix_max_bookings_in_cart' ); |
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 | |
/** | |
* Enable image editing for certain products | |
*/ | |
function prefix_enable_image_editing( $enabled ) { | |
$product_id = get_the_ID(); | |
if( in_array( $product_id, array( 123, 456, 789 ) ) ) { | |
$enabled = 'yes'; | |
} | |
return $enabled; |
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 | |
/** | |
* Fix issue with Divi compatibility | |
*/ | |
remove_filter( 'sanitize_file_name', 'pewc_rename_uploaded_file' ); |