' ) . esc_html__( 'Just to let you know — we\'ve received your subscription renewal order #', 'woocommerce' ) . esc_html( do_shortcode( '[yaymail_order_id]' ) ) . esc_html__( ', and it is now being processed:', 'woocommerce' ); $additionalContent = __( 'Thanks for using ', 'woocommerce' ) . esc_html( do_shortcode( '[yaymail_domain]' ) . '!' ); } if ( 'customer_completed_renewal_order' == $customOrder ) { $emailtext = esc_html__( 'Hi ', 'woocommerce' ) . esc_html( do_shortcode( '[yaymail_billing_first_name]' ) . ',

' ) . esc_html__( 'We have finished processing your subscription renewal order.', 'woocommerce' ); $additionalContent = __( 'Thanks for shopping with us.', 'woocommerce' ); } if ( 'customer_on_hold_renewal_order' == $customOrder ) { $emailtext = esc_html__( 'Hi ', 'woocommerce' ) . esc_html( do_shortcode( '[yaymail_billing_first_name]' ) . ',

' ) . esc_html__( 'Thanks for your renewal order. It\'s on-hold until we confirm that payment has been received. In the meantime, here\'s a reminder of your order:', 'woocommerce' ); $additionalContent = __( 'We look forward to fulfilling your order soon.', 'woocommerce' ); } if ( 'customer_renewal_invoice' == $customOrder ) { $emailtext = esc_html__( 'Hi ', 'woocommerce' ) . esc_html( do_shortcode( '[yaymail_billing_first_name]' ) . ',

' ); $additionalContent = __( 'Thanks for using ', 'woocommerce' ) . esc_html( do_shortcode( '[yaymail_domain]' ) . '!' ); } $textShippingAddress = __( 'Shipping Address', 'woocommerce' ); $textBillingAddress = __( 'Billing Address', 'woocommerce' ); /* @@@ Elements default when reset template. @@@ Note 1: Add characters '\' before special characters in a string. @@@ example 1: "family": "\'Helvetica Neue\',Helvetica,Roboto,Arial,sans-serif", @@@ Note 2: Add characters '\' before special characters in a string. @@@ example 2: "

", "backgroundColor": "#7f54b3", "textColor": "#ffffff", "family": "Helvetica,Roboto,Arial,sans-serif", "paddingTop": "36", "paddingRight": "48", "paddingBottom": "36", "paddingLeft": "48" } },'; } else { $elements .= '{ "id": "802bfe24-7af8-48af-ac5e-6560a81345b3", "type": "ElementText", "nameElement": "Email Heading", "settingRow": { "content": "

' . $emailTitle . '

", "backgroundColor": "#7f54b3", "textColor": "#ffffff", "family": "Helvetica,Roboto,Arial,sans-serif", "paddingTop": "36", "paddingRight": "48", "paddingBottom": "36", "paddingLeft": "48" } },'; } $elements .= '{ "id": "b035d1f1-0cfe-41c5-b79c-0478f144ef5f", "type": "ElementText", "nameElement": "Text", "settingRow": { "content": "

' . $emailtext . '

", "backgroundColor": "#fff", "textColor": "#636363", "family": "Helvetica,Roboto,Arial,sans-serif", "paddingTop": "47", "paddingRight": "50", "paddingBottom": "0", "paddingLeft": "50" } }, { "id": "ad422370-f762-4a26-92de-c4cf3878h0oi", "type": "OrderItem", "nameElement": "Order Item", "settingRow": { "contentBefore": "[yaymail_items_border_before]", "contentAfter": "[yaymail_items_border_after]", "contentTitle": "[yaymail_items_border_title]", "content": "[yaymail_items_border_content]", "backgroundColor": "#fff", "titleColor" : "#7f54b3", "textColor": "#636363", "borderColor": "#e5e5e5", "family": "Helvetica,Roboto,Arial,sans-serif", "paddingTop": "15", "paddingRight": "50", "paddingBottom": "15", "paddingLeft": "50" } }, { "id": "de242956-a617-4213-9107-138842oi4tch", "type": "BillingAddress", "nameElement": "Billing Shipping Address", "settingRow": { "nameColumn": "BillingShippingAddress", "contentTitle": "[yaymail_billing_shipping_address_title]", "checkBillingShipping": "[yaymail_billing_shipping_address_title]", "titleBilling": "' . $textBillingAddress . '", "titleShipping": "' . $textShippingAddress . '", "content": "[yaymail_billing_shipping_address_content]", "titleColor" : "#7f54b3", "backgroundColor": "#fff", "borderColor": "#e5e5e5", "textColor": "#636363", "family": "Helvetica,Roboto,Arial,sans-serif", "paddingTop": "15", "paddingRight": "50", "paddingBottom": "15", "paddingLeft": "50" } }, { "id": "b39bf2e6-8c1a-4384-a5ec-37663da27c8d", "type": "ElementText", "nameElement": "Text", "settingRow": { "content": "

' . $additionalContent . '

", "backgroundColor": "#fff", "textColor": "#636363", "family": "Helvetica,Roboto,Arial,sans-serif", "paddingTop": "0", "paddingRight": "50", "paddingBottom": "38", "paddingLeft": "50" } }, { "id": "b39bf2e6-8c1a-4384-a5ec-37663da27c8ds", "type": "ElementText", "nameElement": "Footer", "settingRow": { "content": "

[yaymail_site_name] - Built with WooCommerce

", "backgroundColor": "#ececec", "textColor": "#8a8a8a", "family": "Helvetica,Roboto,Arial,sans-serif", "paddingTop": "15", "paddingRight": "50", "paddingBottom": "15", "paddingLeft": "50" } }]'; // Templates Cancelled Order $templates = array( $customOrder => array(), ); $templates[ $customOrder ]['elements'] = $elements; return $templates; } }