Skip to content

Order button with obligation to pay

The Checkout button module in Polski for WooCommerce replaces WooCommerce's "Place order" label with "Order with an obligation to pay", or with your own text, on both the classic and the block checkout. It is on by default. Leave the text setting empty and the plugin prints the wording in the shop language; developers can change it with the polski/checkout/order_button_text filter.

With the setting left empty, the button reads "Order with an obligation to pay", translated with the plugin. On a Polish-language site that is "Zamawiam z obowiązkiem zapłaty". Other common Polish variants shops use:

  • "Zamawiam i płacę" (I order and pay)
  • "Kupuję i płacę" (I buy and pay)

Checkout page with legal checkboxes and order button

Go to Polski > Settings > Checkout & Orders and find the Checkout button module. The module itself is switched in Polski > Modules and is on after installation.

Setting Default value Description
Button text Empty: the checkout prints "Order with an obligation to pay" in the shop language (on a Polish-language site "Zamawiam z obowiązkiem zapłaty") Text displayed on the button

The text is stored in the polski_checkout option under order_button_text. It is the only setting: the same text is used for every payment method.

The classic and the block checkout render the button differently, so the plugin sets the label in two ways.

Checkout How the label is set
Classic (shortcode) PHP filter woocommerce_order_button_text
Block checkout Script polski-block-checkout-button, which registers WooCommerce's placeOrderButtonLabel checkout filter through wc.blocksCheckout.registerCheckoutFilters

The block script loads only on the checkout page and only when WooCommerce has registered the wc-blocks-checkout package, so classic checkout pages get no extra JavaScript.

Both paths pass the label through the plugin's own filter, polski/checkout/order_button_text.

Change the text in Polski > Settings > Checkout & Orders. The new text must still indicate the obligation to pay. Leave the field empty to use the default wording in the shop language.

Use the plugin's filter. It reaches the classic and the block checkout:

add_filter('polski/checkout/order_button_text', function (string $text): string {
return 'Kupuję i płacę';
});

A callback on woocommerce_order_button_text changes the classic checkout only, because the block checkout does not run that PHP filter.

On the classic checkout you can read the chosen payment method from the session:

add_filter('polski/checkout/order_button_text', function (string $text): string {
$chosen_payment = WC()->session ? WC()->session->get('chosen_payment_method') : '';
if ($chosen_payment === 'bacs') {
return 'Zamawiam z obowiązkiem zapłaty przelewem';
}
if ($chosen_payment === 'cod') {
return 'Zamawiam z obowiązkiem zapłaty przy odbiorze';
}
return $text;
});

On the block checkout the label is computed once when the page loads, so it does not follow a payment method change.

The button uses default WooCommerce CSS classes. Customize its appearance:

#place_order {
background-color: #2e7d32;
font-size: 1.1em;
font-weight: 700;
padding: 0.8em 2em;
text-transform: none;
}
#place_order:hover {
background-color: #1b5e20;
}

For Block Checkout:

.wc-block-components-checkout-place-order-button {
background-color: #2e7d32;
font-weight: 700;
}

After configuration, check the button in the following scenarios:

  1. Checkout with various payment methods
  2. Checkout as a guest and logged-in user
  3. Checkout with a coupon
  4. Checkout with a subscription (if you use WooCommerce Subscriptions)
  5. Mobile checkout: make sure the text is not truncated

Button text reverts to the default "Place order"

Section titled "Button text reverts to the default "Place order""

Check that:

  1. The plugin is active and the Checkout button module is enabled in Polski > Modules
  2. No other plugin changes the same filter later
  3. The theme does not hardcode the button text in the template

Text is truncated on mobile devices

Section titled "Text is truncated on mobile devices"

The text "Zamawiam z obowiązkiem zapłaty" may not fit on small screens. Solutions:

  • using a shorter variant: "Kupuję i płacę"
  • adjusting CSS: white-space: normal on the button

Block Checkout does not change the text

Section titled "Block Checkout does not change the text"

The label comes from a script that needs WooCommerce's wc-blocks-checkout package. Check the browser console for script errors on the checkout page, and confirm that a caching or optimisation plugin does not delay or drop block-checkout-button.js.

Does the button text change on the block checkout?

Section titled "Does the button text change on the block checkout?"

Yes. The plugin registers WooCommerce's placeOrderButtonLabel checkout filter, so the block checkout shows the same text as the classic one.

Can each payment method have its own button text?

Section titled "Can each payment method have its own button text?"

The setting holds one text for all methods. On the classic checkout you can vary it in code with the polski/checkout/order_button_text filter, as shown above.

How do I go back to the default wording?

Section titled "How do I go back to the default wording?"

Clear the Button text field and save. The plugin then prints "Order with an obligation to pay" in the shop language.

This page is for informational purposes only and does not constitute legal advice. Consult a lawyer before implementation. Polski for WooCommerce is open source software (GPLv2) provided without warranty.