Skip to content

Instantly share code, notes, and snippets.

View pgmb_enable_all_businesses.php
<?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');
View pgmb_woocommerce_variables.php
<?php
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; }
//Get the product
View AbstractField.php
<?php
namespace PGMB\Vendor\Cron;
/**
* Abstract CRON expression field
*/
if(!class_exists('PGMB\Vendor\Cron\AbstractField')){
abstract class AbstractField implements FieldInterface
{
You can’t perform that action at this time.