Documentation

Installation

Installation instructions and shortcode examples are only available in PDF format for the moment.

Download PDF documentation 1.2.11

Actions

All actions and filters are prefixed by mag_products_integration_.

before_products

This PHP action hook is executed before the wrapper of the products list.

after_products

This PHP action hook is executed after the wrapper of the products list.

before_image

This PHP action hook is executed before the product image. If the image is missing, this hook is not executed.

Parameters

  • $product: Array containing all the product details.

after_image

This PHP action hook is executed after the product image. If the image is missing, this hook is not executed.

Parameters

  • $product: Array containing all the product details.

before_title

This PHP action hook is executed before the product title.

Parameters

  • $product: Array containing all the product details.

after_title

This PHP action hook is executed after the product title.

Parameters

  • $product: Array containing all the product details.

before_short_description

This PHP action hook is executed before the product short description. If the short description is missing, this hook is not executed.

Parameters

  • $product: Array containing all the product details.

after_short_description

This PHP action hook is executed after the product short description. If the short description is missing, this hook is not executed.

Parameters

  • $product: Array containing all the product details.

before_price

This PHP action hook is executed before the product price. If the price is missing, this hook is not executed.

Parameters

  • $product: Array containing all the product details.

after_price

This PHP action hook is executed after the product price. If the price is missing, this hook is not executed.

Parameters

  • $product: Array containing all the product details.

before_add_to_cart_button

This PHP action hook is executed before the add to cart button (either buy it now or view details button).

Parameters

  • $product: Array containing all the product details.

after_add_to_cart_button

This PHP action hook is executed after the add to cart button (either buy it now or view details button).

Parameters

  • $product: Array containing all the product details.

no_products_found

This PHP action hook is executed when no products are found.

Filters

All actions and filters are prefixed by mag_products_integration_.

product_image

This filter is executed on the product image.

Parameters

  • $image: The final HTML of the image including the wrapper and the link.
  • $product: Array containing all the product details.
  • $width: Width of the container of the image.
  • $image_width: Width of the image.
  • $image_height: Height of the image.

product_name

This filter is executed on the product name.

Parameters

  • $escaped_product_name: Product name after esc_attr().
  • $product_name: Product name not escaped.

product_short_description

This filter is executed on the product short description.

Parameters

  • $html_description: The final HTML of the description including the div wrapper and the p.
  • $description: Product description.

product_final_price_without_tax

This filter is executed on the final price without tax. If the product is in sale, it will be the sale price, otherwise it will be the regular price.

Parameters

  • $price_with_prefix_suffix: Final display of the price.
  • $prefix: Price prefix.
  • $price: Product price.
  • $suffix: Price suffix.

product_regular_price_without_tax

This filter is executed on the regular price when the product is in sale. If it is not, the filter will not be executed.

Parameters

  • $price_with_prefix_suffix: Final display of the price.
  • $prefix: Price prefix.
  • $price: Product price.
  • $suffix: Price suffix.

product_buy_it_now_button

This filter is executed on the buy it now button. The buy it now button is displayed when the product is a regular product. If it's a grouped or configurable product, the view details button will be displayed.

Parameters

  • $button: The final HTML of the button: text + link.
  • $buy_it_now_url: Buy it now URL (which automatically add the product to the cart).

product_view_details_button

This filter is executed on the view details button. The view details button is displayed when the product is a grouped or configurable product. If the product is a regular product, the buy it now button will be displayed.

Parameters

  • $button: The final HTML of the button: text + link.
  • $product_url: URL to the product page (single product view page).