WPCode Functions

// Skip show library screen add_filter( ‘wpcode_add_snippet_show_library’, ‘__return_false’ ); // Move status column add_filter( ‘wpcode_code_snippets_table_columns’, function ( $columns ) { if ( isset( $columns[‘status’] ) ) { $status = $columns[‘status’]; unset( $columns[‘status’] ); $columns = array_slice( $columns, 0, 1, true…Continue reading

WP Fusion HubSpot Contact Lists & Meta On-Demand Sync

namespace ARI; class WPFusionHubSpotOnDemandSync { public function __constructor() { if(!is_admin()) { \add_action(‘wpf_woocommerce_payment_complete’, [$this, ‘handle_payment_complete’], 0, 2); } } public function log($msg, $level= ‘info’) { \wpf_log($level, \wpf_get_current_user_id(), $msg, [‘source’ => __CLASS__ . ‘::’ . __FUNCTION__]); } public function handle_payment_complete($order_id, $contact_id) {…Continue reading

Define access to WPCode

/* ** This snippet controls who can access the WPcode plugin ** Added here to prevent people being able to bypass via WPCode SafeMode ** All other snippets are in the WPcode plugin */ add_filter( ‘map_meta_cap’, function ( $caps, $cap,…Continue reading