Partial.ly
Back to home

Partial.ly Widget for WooCommerce

Partial.ly Widget for WooCommerce

The widget can be activated on your product pages to let customers know they can purchase with a Partial.ly payment plan. It lets the customer interactively see the payment plan options available to them.

The widget can be enabled within your Partial.ly Woo Plugin under WooCommerce > Settings > Payments > Partial.ly Payment Plans > Manage > Widget Options > Enable.

Within the plugin, you can alter the widget's:

  • Style — either stacked or thin. Default is stacked.
  • Title — text for the title, for stacked style widgets.
  • Body — customize the body text. If left blank, has default text.
  • Trigger Text — text for the widget link that opens the popup.
  • Popup Details — custom text in the header of the widget popup.

You can also enable a checkout button to appear on the widget and customize the text that appears on this button.

Custom placeholders

A few custom placeholders are available for the widget body to insert dynamic information:

  • down_payment_amount — the calculated down payment amount
  • down_payment_min_amount — the calculated minimum down payment amount, for offers with a flexible down payment
  • payment_amount — the calculated scheduled payment amount

These placeholders are dynamically calculated using Liquid syntax. For example:

Payment plan available, as low as {{payment_amount}} per month

Limit view

If needed, you can limit the widget to only appear on products with a specific product tag. Add the following code to your functions.php file, replacing SAMPLE-TAG with your tag of choice.

// don't render the widget unless the current product is tagged with SAMPLE-TAG
function custom_partially_widget_settings($settings) {
    $settings['render'] = false;
    $tags = get_the_terms( get_the_ID(), 'product_tag' );
    if ($tags) {
        foreach ($tags as $tag) {
            if ($tag->name == 'SAMPLE-TAG') $settings['render'] = true;
        }
    }
    return $settings;
}
add_filter('partially_widget_config', 'custom_partially_widget_settings');