Search
Actions / Filters Archives - Page 2 of 3 - WP Global Cart
301
archive,paged,tax-documentation_category,term-actions-filters,term-301,paged-2,theme-awake,eltd-core-1.1,woocommerce-no-js,awake child-child-ver-1.0.0,awake-ver-1.0,eltd-smooth-scroll,eltd-smooth-page-transitions,eltd-mimic-ajax,eltd-grid-1200,eltd-blog-installed,eltd-default-style,eltd-fade-push-text-top,eltd-header-standard,eltd-sticky-header-on-scroll-down-up,eltd-default-mobile-header,eltd-sticky-up-mobile-header,eltd-menu-item-first-level-bg-color,eltd-dropdown-slide-from-top,eltd-,eltd-fullscreen-search eltd-search-fade,eltd-side-menu-slide-from-right,wpb-js-composer js-comp-ver-6.3.0,vc_responsive
 

Archive

WP Global Cart /  (Page 2)

woogc/get_checkout_url

Name: woogc/get_checkout_url Type: Filter Arguments: $checkout_url The filter is being used to change the $checkout_url for specific shops. As default this is being controlled through admin settings but can be adjusted to particular shops if need. The following code change the checkout url to shop default when blog_id is 4: add_filter( 'woogc/get_checkout_url', 'WooGC_get_checkout_url'); function WooGC_get_checkout_url ( $checkout_url ) { ...

View More

woogc/get_gc_sites

Name: woogc/get_gc_sites Type: Filter Arguments: $sites, $context The filter can be used to exclude specific shops when WooGlobalCart core calls the internal get_gc_sites() method. For example, a shop can be excluded from the reports. The following code, removes shop ID's 2 from the reporting engine: add_filter('woogc/get_gc_sites', '__WooGC_get_gc_sites', 10, 2); function __WooGC_get_gc_sites( $sites, $context ) { ...

View More

woogc/get_cart_from_session/validate_hash

Name: woogc/get_cart_from_session/validate_hash Type: Filter Arguments: $force_validation, $values When reconstructing the cart from session data, WooCommerce checks each of the products for validation. That includes existence, quantity, purchaseability, data hash. It happens, if a plugin implements a custom product type, if not active/available for a specific shop, the WooCommerce removes it from the cart. This is caused by a data hash that does not match anymore. This filter can be used to force hash validity for specific products in the cart. For example, if using the...

View More

woogc/ps/interfaces/synchronize_to_sites

Name: woogc/ps/interfaces/synchronize_to_sites Type: Filter Arguments: $sites The filter allows you to regulate the shops that are accessible within the Synchronization Interface, determining where the feature is available. The following example check if the edit page is for product ID 33 and 44. If match, it disable the synchronization option to the Shop ID 2: add_filter ( 'woogc/ps/interfaces/synchronize_to_sites', 'woogc_ps_interfaces_synchronize_to_sites' ); function woogc_ps_interfaces_synchronize_to_sites( $sites ) { ...

View More

woogc/ps/synchronize_product/ignore_meta_key

Name: woogc/ps/synchronize_product/ignore_meta_key Type: Filter Arguments: $IgnoreMeta, $prop_title, $prop_value, $child_product, $main_product_data, $origin_product_blog_ID The filter can be used to ignore/skip a meta field to replicate, when running a Product synchronization procedure. The following example ignores any parent Product Title change add_filter ( 'woogc/ps/synchronize_product/ignore_meta_key', 'woogc_ps_synchronize_product_ignore_meta_key', 10, 6 ); function woogc_ps_synchronize_product_ignore_meta_key ( $ignore, $prop_title, $prop_value, $child_product, $main_product_data, $origin_product_blog_ID ) { if ( $prop_title...

View More

wogc/admin/manage_shop_order_columns

Name: wogc/admin/manage_shop_order_columns Type: Filter Arguments: $columns The filter can be used to add new column on SuperAdmin Orders interface. To render code for a custom column see wogc/admin/manage_shop_order_column_data The following example add a new column called Products add_filter('wogc/admin/manage_shop_order_columns', 'custom_wogc_admin_manage_shop_order_columns'); function custom_wogc_admin_manage_shop_order_columns( $columns ) { $columns['products'] =...

View More

wogc/admin/manage_shop_order_column_data

Name: wogc/admin/manage_shop_order_column_data Type: Action Arguments: $post, $column_name The filter can be used to render data for a custom created column on SuperAdmin Orders interface. The following example render html for column called Products add_action('wogc/admin/manage_shop_order_column_data', 'custom_wogc_admin_manage_shop_order_column_data', 10, 2); function custom_wogc_admin_manage_shop_order_column_data( $post, $column_name ) { if ( $column_name != 'products') ...

View More

woogc/network_orders/get_orders/mysql_query/SELECT

Name: woogc/network_orders/get_orders/mysql_query/SELECT Type: Filter Arguments: $mysql_query, $blog_id The filter can be used to modify the MySQL query used by the Network Orders interface, that outputs the orders from all shops. The following code example shows only the orders for shop_manager roles, from shops where the user have access : add_filter ( 'woogc/network_orders/get_orders/mysql_query/SELECT', '_custom_network_orders_mysql_query_SELECT', 10, 2 ); function _custom_network_orders_mysql_query_SELECT ( $mysql_query, $blog_id ) { ...

View More

woogc/network_orders/get_orders/mysql_query/JOIN

Name: woogc/network_orders/get_orders/mysql_query/JOIN Type: Filter Arguments: $mysql_query, $blog_id The filter can be used to modify the MySQL query used by the Network Orders interface, which outputs the orders from all shops. The following code example shows only the orders for shop_manager roles, from shops where the user have access : add_filter ( 'woogc/network_orders/get_orders/mysql_query/JOIN', '_custom_network_orders_mysql_query_JOIN', 10, 2 ); function _custom_network_orders_mysql_query_JOIN ( $mysql_query, $blog_id ) { ...

View More

woogc/network_orders/get_orders/mysql_query/WHERE

Name: woogc/network_orders/get_orders/mysql_query/WHERE Type: Filter Arguments: $mysql_query, $blog_id The filter can be used to modify the MySQL query used by the Network Orders interface to output the orders from all shops. The following code example shows only the orders for shop_manager roles, from shops where the user have access : add_filter ( 'woogc/network_orders/get_orders/mysql_query/WHERE', '_custom_network_orders_mysql_query_WHERE_2', 10, 2 ); function _custom_network_orders_mysql_query_WHERE_2 ( $mysql_query, $blog_id ) { ...

View More