I'm using WPML plugin and it works great in my theme except in an ajax. This is my code:
ob_start();
wc_add_notice( __( 'Sorry, the total meals exceeds the limit.', 'woocommerce' ), "error" );
wc_get_template( 'content-subcription-plan.php' );
$woocommerce_order_review = ob_get_clean();
$data = array('fragments' => $woocommerce_order_review);
wp_send_json( $data );
die();
I mean the below code does'nt working.
__( 'Sorry, the total meals exceeds the limit.', 'woocommerce' )
Note: I try above code without ajax and it works great.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire