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 | |
namespace PGMB\Vendor\Cron; | |
/** | |
* Abstract CRON expression field | |
*/ | |
if(!class_exists('PGMB\Vendor\Cron\AbstractField')){ | |
abstract class AbstractField implements FieldInterface | |
{ |
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 pgmb_enable_all_locations($locations){ | |
foreach($locations as &$location){ | |
$location->locationState->isLocalPostApiDisabled = false; | |
} | |
return $locations; | |
} | |
add_filter('mbp_business_selector_locations', 'pgmb_enable_all_locations'); |
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 | |
//Remove the <?php opening tag to get rid of the red exclamation mark in the Code Snippets plugin | |
function mbp_add_woocommerce_product_variables($variables){ | |
//Get the product ID from the variables | |
$id = intval($variables["%ID%"]); | |
//Check whether the WooCommerce wc_get_product function exists, and this is a product post type | |
if(!function_exists('wc_get_product') || get_post_type($id) !== 'product'){ return $variables; } |