Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hamidrezayazdani/c241a9714c378af50c7114835b6f5db5 to your computer and use it in GitHub Desktop.
Save hamidrezayazdani/c241a9714c378af50c7114835b6f5db5 to your computer and use it in GitHub Desktop.
<?php
/**
* Change "Add to cart" button text
*/
add_filter( 'woocommerce_product_single_add_to_cart_text', 'ywp_override_add_to_cart_text', PHP_MAX_INT );
add_filter( 'woocommerce_product_add_to_cart_text', 'ywp_override_add_to_cart_text', PHP_MAX_INT );
function ywp_override_add_to_cart_text() {
return 'ثبت سفارش';
}
// The code goes to your active theme (or child theme) functions.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment