diff --git a/includes/class-paybutton-admin.php b/includes/class-paybutton-admin.php index fef921b..06ddc32 100644 --- a/includes/class-paybutton-admin.php +++ b/includes/class-paybutton-admin.php @@ -204,7 +204,7 @@ public function paywall_settings_page() { $args = array( 'settings_saved' => $settings_saved, - 'admin_wallet_address' => get_option( 'paybutton_admin_wallet_address', '' ), + 'paybutton_admin_wallet_address' => get_option( 'paybutton_admin_wallet_address', '' ), 'default_price' => get_option( 'paybutton_paywall_default_price', 5.5 ), 'current_unit' => get_option( 'paybutton_paywall_unit', 'XEC' ), 'btn_text' => get_option( 'paybutton_text', 'Pay to Unlock' ), diff --git a/includes/class-paybutton-ajax.php b/includes/class-paybutton-ajax.php index 3500a18..e0e98aa 100644 --- a/includes/class-paybutton-ajax.php +++ b/includes/class-paybutton-ajax.php @@ -397,7 +397,7 @@ public function fetch_unlocked_content() { } // Run the full post-content pipeline (blocks, shortcodes, embeds, autop, etc.) filter - $body = apply_filters( 'the_content', $inner ); + $body = apply_filters( 'the_content', $inner ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- core hook // Restore the flag if ( isset( $wp_query ) ) { diff --git a/includes/class-paybutton-public.php b/includes/class-paybutton-public.php index ed4d5e0..98a1c56 100644 --- a/includes/class-paybutton-public.php +++ b/includes/class-paybutton-public.php @@ -163,9 +163,9 @@ private function load_public_template( $template_name, $args = array() ) { * Output the sticky header HTML. */ public function output_sticky_header() { - $user_wallet_address = sanitize_text_field( PayButton_State::get_address() ); + $paybutton_user_wallet_address = sanitize_text_field( PayButton_State::get_address() ); $this->load_public_template( 'sticky-header', array( - 'user_wallet_address' => $user_wallet_address + 'paybutton_user_wallet_address' => $paybutton_user_wallet_address ) ); } @@ -280,20 +280,20 @@ class="paybutton-container" * @return string */ public function profile_shortcode() { - $user_wallet_address = sanitize_text_field( PayButton_State::get_address() ); - if ( empty( $user_wallet_address ) ) { + $paybutton_user_wallet_address = sanitize_text_field( PayButton_State::get_address() ); + if ( empty( $paybutton_user_wallet_address ) ) { return '
You must be logged in to view your unlocked content.
'; } global $wpdb; $table_name = $wpdb->prefix . 'paybutton_paywall_unlocked'; - $rows = $wpdb->get_results( $wpdb->prepare( + $paybutton_rows = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT post_id FROM $table_name WHERE pb_paywall_user_wallet_address = %s ORDER BY id DESC", - $user_wallet_address + $paybutton_user_wallet_address ) ); ob_start(); $this->load_public_template( 'profile', array( - 'user_wallet_address' => $user_wallet_address, - 'rows' => $rows + 'paybutton_user_wallet_address' => $paybutton_user_wallet_address, + 'paybutton_rows' => $paybutton_rows ) ); return ob_get_clean(); } diff --git a/templates/admin/content.php b/templates/admin/content.php index f07b12b..21dd0d5 100644 --- a/templates/admin/content.php +++ b/templates/admin/content.php @@ -37,23 +37,21 @@ function paybutton_sort_content_table( $col, $label, $orderby, $order, $base_url -Enter your wallet address to receive paywall payments.
diff --git a/templates/public/profile.php b/templates/public/profile.php index 82a9091..cdb2699 100644 --- a/templates/public/profile.php +++ b/templates/public/profile.php @@ -6,16 +6,16 @@