| @@ -107,14 +107,8 @@ | ||
| 107 | 107 | 'description' => __( 'Additional Content', 'yaymail' ), |
| 108 | 108 | 'group' => 'general', |
| 109 | 109 | 'callback' => [ $this, 'yaymail_additional_content' ], |
| 110 | 110 | ], |
| 111 | - [ | |
| 112 | - 'name' => 'yaymail_store_email', | |
| 113 | - 'description' => __( 'Store Email', 'yaymail' ), | |
| 114 | - 'group' => 'general', | |
| 115 | - 'callback' => [ $this, 'yaymail_store_email' ], | |
| 116 | - ], | |
| 117 | 111 | ]; |
| 118 | 112 | |
| 119 | 113 | return apply_filters( 'yaymail_common_shortcodes', $shortcodes ); |
| 120 | 114 | } |
| @@ -145,13 +139,13 @@ | ||
| 145 | 139 | $is_placeholder = isset( $data['is_placeholder'] ) ? $data['is_placeholder'] : false; |
| 146 | 140 | |
| 147 | 141 | $text_link = isset( $shortcode_atts['text_link'] ) ? $shortcode_atts['text_link'] : TemplateHelpers::get_content_as_placeholder( 'text_link', __( 'My Account', 'yaymail' ), $is_placeholder ); |
| 148 | 142 | |
| 149 | - return '<a href="' . esc_url( function_exists( 'WC' ) && defined( 'YAYMAIL_VERSION' ) ? wc_get_page_permalink( 'myaccount' ) : '' ) . '"> ' . $text_link . ' </a>'; | |
| 143 | + return '<a href="' . esc_url( wc_get_page_permalink( 'myaccount' ) ) . '"> ' . $text_link . ' </a>'; | |
| 150 | 144 | } |
| 151 | 145 | |
| 152 | 146 | public function yaymail_user_account_url() { |
| 153 | - return esc_url( function_exists( 'WC' ) && defined( 'YAYMAIL_VERSION' ) ? wc_get_page_permalink( 'myaccount' ) : '' ); | |
| 147 | + return esc_url( wc_get_page_permalink( 'myaccount' ) ); | |
| 154 | 148 | } |
| 155 | 149 | |
| 156 | 150 | public function yaymail_user_email( $data ) { |
| 157 | 151 | |
| @@ -344,12 +338,6 @@ | ||
| 344 | 338 | if ( isset( $render_data['additional_content'] ) ) { |
| 345 | 339 | return wpautop( wptexturize( $render_data['additional_content'] ) ); |
| 346 | 340 | } |
| 347 | 341 | return __( 'Additional content', 'yaymail' ); |
| 348 | - } | |
| 349 | - | |
| 350 | - public function yaymail_store_email( $data ) { | |
| 351 | - $store_email = sanitize_email( get_option( 'woocommerce_email_from_address' ) ?? '' ); | |
| 352 | - | |
| 353 | - return $store_email; | |
| 354 | 342 | } |
| 355 | 343 | } |