Edwiser Bridge Shortcode

Below, you’ll find a detailed guide on how to add the Edwiser Bridge Shortcode to your WordPress website, including its parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Edwiser Bridge Plugin shortcode not to show or not to work correctly.

Before starting, here is an overview of the Edwiser Bridge Plugin and the shortcodes it provides:

Plugin Icon
Edwiser Bridge – WordPress Moodle LMS Integration

"Edwiser Bridge – WordPress Moodle LMS Integration is a versatile plugin that seamlessly connects your WordPress site with the Moodle Learning Management System, enhancing online learning and course management."

★★★★✩ (67) Active Installs: 5000+ Tested with: 6.3.2 PHP Version: false
Included Shortcodes:
  • [paypal]

Edwiser Bridge [paypal] Shortcode

The Edwiser Bridge PayPal shortcode is a feature that facilitates online payments for courses. It generates a payment button that redirects users to PayPal for secure transactions. The shortcode is highly customizable, allowing you to specify parameters such as alignment, margins, and button appearance. It also supports multiple payment types, including ‘Pay Now’, ‘Subscribe’, and ‘Add to Cart’. The PHP code associated with the shortcode handles these customizations and implements the payment process. It ensures a smooth, user-friendly experience for course enrolment and payment. Shortcode: [add_shortcode( ‘paypal’, ‘eb_enhanced_paypal_shortcode’ )]

Shortcode: [paypal]

PHP Function Code

In case you have difficulties debugging what causing issues with [paypal] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'paypal', 'eb_enhanced_paypal_shortcode' );

Shortcode PHP function:

function eb_enhanced_paypal_shortcode( $atts ) {
		$edwiser_bridge_alt_add = 'Add to cart (Paypal)';
		$atts                   = shortcode_atts(
			array(
				'type'         => '',
				'textalign'    => '',
				'divwidth'     => '',
				'float'        => '',
				'marginleft'   => '',
				'marginright'  => '',
				'margintop'    => '',
				'marginbottom' => '',
				'sandbox'      => '',
				'qty'          => '1',
				'shipping'     => '',
				'shipping2'    => '',
				'imageurl'     => '',
				'imagewidth'   => '100px',
				'noshipping'   => '1',
				'nonote'       => '1',
				'rm'           => '2',
				'lc'           => '',
				'cbt'          => esc_html__( 'Complete Your Purchase', 'edwiser-bridge' ),
				'cn'           => '',
				'pagestyle'    => 'paypal',
				'notifyurl'    => '',
				'notifyurl2'   => '',
				'returnurl'    => '',
				'cancelurl'    => '',
				'scriptcode'   => 'scriptcode',
				'email'        => '',
				'currencycode' => '',
				'itemno'       => '',
				'name'         => '',
				'amount'       => '',
				'cancelreturn' => '',
				'a1'           => '',
				'p1'           => '',
				't1'           => '',
				'a2'           => '',
				'p2'           => '',
				't2'           => '',
				'a3'           => '',
				'p3'           => '',
				't3'           => '',
				'src'          => 1,
				'srt'          => 0,
				'sra'          => 1,
				'modify'       => '',
				'custom'       => '',
			),
			$atts
		);

		switch ( $atts['type'] ) {
			case 'paynow':
				$code = '
			<div style="';
				eb_check_array_value( $atts['textalign'], $code, 'text-align: ' . $atts['textalign'] . ';' );

				if ( $atts['divwidth'] > 0 ) {
					$code .= 'width: ' . $atts['divwidth'] . ';';
				}
				if ( $atts['float'] ) {
					$code .= 'float: ' . $atts['float'] . ';';
				} else {
					$code .= 'margin:0 auto;';
				}
				if ( $atts['marginleft'] > -1 ) {
					$code .= 'margin-left: ' . $atts['marginleft'] . ';';
				}
				if ( $atts['marginright'] > -1 ) {
					$code .= 'margin-right: ' . $atts['marginright'] . ';';
				} else {
					$code .= 'margin-top: 10px;';
				}
				if ( $atts['margintop'] > -1 ) {
					$code .= 'margin-top: ' . $atts['margintop'] . ';';
				} else {
					$code .= 'margin-top: 10px;';
				}
				if ( $atts['marginbottom'] > -1 ) {
					$code .= 'margin-bottom: ' . $atts['marginbottom'] . ';';
				} else {
					$code .= 'margin-bottom: 10px;';
				}

				$paypal_url = 'https://www.paypal.com/cgi-bin/webscr';
				$pixel_url  = 'https://www.paypal.com/en_US/i/scr/pixel.gif';
				$button_url = 'https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif';

				if ( 'yes' === $atts['sandbox'] ) {
					$paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
					$pixel_url  = 'https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif';
					$button_url = 'https://www.sandbox.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif';
				}

				$code .= '"><form name="buynow" id="buynowform" action="' . $paypal_url . '" method="post">
			<input type="hidden" name="cmd" value="_xclick" />

			<input type="hidden" name="bn" value="PP-BuyNowBF" />
			<input type="hidden" name="business" value="' . $atts['email'] . '">
			<input type="hidden" name="currency_code" value="' . $atts['currencycode'] . '">
			<input type="hidden" name="item_number" value="' . $atts['itemno'] . '">
			<input type="hidden" name="item_name" value="' . $atts['name'] . '">
			<input type="hidden" name="amount" value="' . $atts['amount'] . '">';

				// Add Quantity.
				if ( 'ask' === $atts['qty'] ) {
					$code .= '<input type="hidden" name="undefined_quantity" value="1">';
				} else {
					$code .= '<input type="hidden" name="quantity" value="' . $atts['qty'] . '">';
				}

				// Add Shipping.
				eb_check_array_value(
					$atts['shipping'],
					$code,
					'<input type="hidden" name="shipping" value="' . $atts['shipping'] . '">'
				);

				// Add Shipping2 - additional items shipping.
				eb_check_array_value(
					$atts['shipping2'],
					$code,
					'<input type="hidden" name="shipping2" value="' . $atts['shipping2'] . '">'
				);

				// Define Image to Use.
				if ( $atts['imageurl'] ) {
					$code .= '<input type="hidden" src="' . $atts['imageurl'] . '" border="0"
					name="submit" alt="' . $edwiser_bridge_alt_add . '"';
					if ( $atts['imagewidth'] ) {
						$code .= ' width="' . $atts['imagewidth'] . '"';
					}
					$code .= ' class="ppalbtn">';
				} else {
					$code .= '<input type="hidden" src="' . $button_url . '" border="0" name="submit"
					alt="' . $edwiser_bridge_alt_add . '" class="ppalbtn">';
				}
				$code .= '<input type="submit" value="' . esc_html__( 'Take this Course', 'edwiser-bridge' ) . '"
				class="wdm-btn eb_primary_btn eb-paid-course button button-primary et_pb_button et_pb_contact_submit" id="eb_course_payment_button">';

				if ( $atts['noshipping'] > -1 ) {
					$code .= '
				<input type="hidden" name="no_shipping" value="' . $atts['noshipping'] . '">';
				}

				if ( $atts['nonote'] > -1 ) {
					$code .= '
				<input type="hidden" name="no_note" value="' . $atts['nonote'] . '" />';
				}

				if ( $atts['rm'] > -1 ) {
					$code .= '
				<input type="hidden" name="rm" value="' . $atts['rm'] . '">';
				}

				// Add language code.
				eb_check_array_value( $atts['lc'], $code, '<input type="hidden" name="lc" value="' . $atts['lc'] . '">' );

				// Checkout Page Variables.
				// Add return to merchant text.
				eb_check_array_value( $atts['cbt'], $code, '<input type="hidden" name="cbt" value="' . $atts['cbt'] . '">' );

				// Add Cancel Return URL.
				eb_check_array_value(
					$atts['cancelreturn'],
					$code,
					'<input type="hidden" name="cancel_return" value="' . $atts['cancelreturn'] . '">'
				);

				// Add Special Instructions.
				eb_check_array_value(
					$atts['cn'],
					$code,
					'<input type="hidden" name="cn" value="' . $atts['cn'] . '">'
				);

				// Add Page Style.
				eb_check_array_value(
					$atts['pagestyle'],
					$code,
					'<input type="hidden" name="page_style" value="' . $atts['pagestyle'] . '">'
				);

				eb_check_array_value(
					$atts['notifyurl'],
					$code,
					'<input type="hidden" name="notify_url" value="' . $atts['notifyurl'] . '">'
				);

				eb_check_array_value(
					$atts['notifyurl2'],
					$code,
					'<input type="hidden" name="notify_url" value="' . $atts['notifyurl2'] . '">'
				);

				eb_check_array_value(
					$atts['returnurl'],
					$code,
					'<input type="hidden" name="return" value="' . $atts['returnurl'] . '">'
				);

				eb_check_array_value(
					$atts['cancelurl'],
					$code,
					'<input type="hidden" name="cancel_return" value="' . $atts['cancelurl'] . '">'
				);

				eb_check_array_value(
					$atts['custom'],
					$code,
					'<input type="hidden" name="custom" value="' . $atts['custom'] . '">'
				);

				wp_add_inline_script( 'eb_paypal_js', $atts['scriptcode'] );
				wp_enqueue_script( 'eb_paypal_js' );

				$code .= '</form>';

				$code .= '</div>';
				break;
			case 'subscribe':
				$code = '
			<div style="';
				eb_check_array_value( $atts['textalignte'], $code, 'text-align: ' . $atts['textalign'] . ';' );

				if ( $atts['divwidth'] > 0 ) {
					$code .= 'width: ' . $atts['divwidth'] . ';';
				}

				if ( $atts['float'] ) {
					$code .= 'float: ' . $atts['float'] . ';';
				} else {
					$code .= 'margin:0 auto;';
				}

				if ( $atts['marginleft'] > -1 ) {
					$code .= 'margin-left: ' . $atts['marginleft'] . ';';
				}

				if ( $atts['marginright'] > -1 ) {
					$code .= 'margin-right: ' . $atts['marginright'] . ';';
				} else {
					$code .= 'margin-top: 10px;';
				}

				if ( $atts['margintop'] > -1 ) {
					$code .= 'margin-top: ' . $atts['margintop'] . ';';
				} else {
					$code .= 'margin-top: 10px;';
				}

				if ( $atts['marginbottom'] > -1 ) {
					$code .= 'margin-bottom: ' . $atts['marginbottom'] . ';';
				} else {
					$code .= 'margin-bottom: 10px;';
				}
				$paypal_url = 'https://www.paypal.com/cgi-bin/webscr';

				if ( 'yes' === $atts['sandbox'] ) {
					$paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
				}

				$code .= '"><form name="subscribewithpaypal" action="' . $paypal_url . '" method="post">
			<input type="hidden" name="cmd" value="_xclick-subscriptions" />

			<input type="image" src="https://www.paypal.com/en_US/i/scr/pixel.gif" border="0"
			alt="" width="1" height="1" class="ppalholder">';

				if ( $atts['imageurl'] ) {
					$code .= '<input type="hidden" src="' . $atts['imageurl'] . '" border="0"
					name="submit" alt="' . $edwiser_bridge_alt_add . '"';
					if ( $atts['imagewidth'] ) {
						$code .= ' width="' . $atts['imagewidth'] . '"';
					}
					$code .= ' class="ppalbtn">';
				} else {
					$code .= '<input type="hidden" src="https://www.paypal.com/en_AU/i/btn/btn_subscribeCC_LG.gif"
					border="0" name="submit" alt="' .
					esc_html__( 'PayPal - The safer, easier way to pay online.', 'edwiser-bridge' ) . '" class="ppalbtn">';
				}
				$code .= '<input type="submit" value="' . esc_html__( 'Take this Course', 'edw' ) .
						'" class="wdm-btn eb_primary_btn eb-paid-course button button-primary et_pb_button et_pb_contact_submit" id="eb_course_payment_button ">';

				eb_check_array_value(
					$atts['email'],
					$code,
					'<input type="hidden" name="business" value="' . $atts['email'] . '">'
				);

				eb_check_array_value(
					$atts['currencycode'],
					$code,
					'<input type="hidden" name="currency_code" value="' . $atts['currencycode'] . '">'
				);

				eb_check_array_value(
					$atts['itemno'],
					$code,
					'<input type="hidden" name="item_number" value="' . $atts['itemno'] . '">'
				);

				eb_check_array_value(
					$atts['name'],
					$code,
					'<input type="hidden" name="item_name" value="' . $atts['name'] . '">'
				);

				eb_check_array_value(
					$atts['amount'],
					$code,
					'<input type="hidden" name="amount" value="' . $atts['amount'] . '">'
				);

				if ( $atts['noshipping'] > -1 ) {
					$code .= '<input type="hidden" name="no_shipping" value="' . $atts['noshipping'] . '" />';
				}

				$code .= '<input type="hidden" name="no_note" value="1" />';

				/* Trial 1 settings */
				if ( $atts['a1'] > -1 ) {
					$code .= '<input type="hidden" name="a1" value="' . $atts['a1'] . '">';
				}

				if ( $atts['p1'] > 0 ) {
					$code .= '<input type="hidden" name="p1" value="' . $atts['p1'] . '">';
				}

				eb_check_array_value( $atts['t1'], $code, '<input type="hidden" name="t1" value="' . $atts['t1'] . '">' );

				/* Trial 2 settings */
				if ( $atts['a2'] > -1 ) {
					$code .= '<input type="hidden" name="a2" value="' . $atts['a2'] . '">';
				}

				if ( $atts['p2'] > 0 ) {
					$code .= '<input type="hidden" name="p2" value="' . $atts['p2'] . '">';
				}

				eb_check_array_value( $atts['t2'], $code, '<input type="hidden" name="t2" value="' . $atts['t2'] . '">' );

				/* Ongoing subscription */
				if ( $atts['a3'] > 0 ) {
					$code .= '<input type="hidden" name="a3" value="' . $atts['a3'] . '">';
				}

				if ( $atts['p3'] > 0 ) {
					$code .= '<input type="hidden" name="p3" value="' . $atts['p3'] . '">';
				}

				eb_check_array_value( $atts['t3'], $code, '<input type="hidden" name="t3" value="' . $atts['t3'] . '">' );

				// SRC - are payments recurring? 0 = No, 1 = Yes.
				if ( 0 === $atts['src'] ) {
					$code .= '<input type="hidden" name="src" value="0">';
				} else {
					$code .= '<input type="hidden" name="src" value="1">';
				}

				// SRT - no of time payments recur?.
				if ( $atts['srt'] > 1 ) {
					$code .= '<input type="hidden" name="srt" value="' . $atts['srt'] . '">';
				}

				// SRA - re-attempt if fail?  0 = No, 1 = Yes.
				if ( 0 === $atts['sra'] ) {
					$code .= '<input type="hidden" name="sra" value="0">';
				} else {
					$code .= '<input type="hidden" name="sra" value="1">';
				}

				if ( $atts['rm'] > -1 ) {
					$code .= '<input type="hidden" name="rm" value="' . $atts['rm'] . '">';
				}

				eb_check_array_value( $atts['lc'], $code, '<input type="hidden" name="lc" value="' . $atts['lc'] . '">' );

				eb_check_array_value( $atts['cbt'], $code, '<input type="hidden" name="cbt" value="' . $atts['cbt'] . '">' );

				eb_check_array_value(
					$atts['modify'],
					$code,
					'<input type="hidden" name="modify" value="' . $atts['modify'] . '">'
				);

				eb_check_array_value(
					$atts['cancelreturn'],
					$code,
					'<input type="hidden" name="cancel_return" value="' . $atts['cancelreturn'] . '">'
				);

				eb_check_array_value(
					$atts['cn'],
					$code,
					'<input type="hidden" name="cn" value="' . $atts['cn'] . '">'
				);

				eb_check_array_value(
					$atts['pagestyle'],
					$code,
					'<input type="hidden" name="page_style" value="' . $atts['pagestyle'] . '">'
				);

				eb_check_array_value(
					$atts['notifyurl'],
					$code,
					'<input type="hidden" name="notify_url" value="' . $atts['notifyurl'] . '">'
				);

				eb_check_array_value(
					$atts['notifyurl2'],
					$code,
					'<input type="hidden" name="notify_url" value="' . $atts['notifyurl2'] . '">'
				);

				eb_check_array_value(
					$atts['returnurl'],
					$code,
					'<input type="hidden" name="return" value="' . $atts['returnurl'] . '">'
				);

				eb_check_array_value(
					$atts['cancelurl'],
					$code,
					'<input type="hidden" name="cancel_return" value="' . $atts['cancelurl'] . '">'
				);

				wp_add_inline_script( 'eb_paypal_js', $atts['scriptcode'] );
				wp_enqueue_script( 'eb_paypal_js' );

				$code .= '</form></div>';
				break;
			case 'hosted':
				$code = '<div style="';
				eb_check_array_value( $atts['textalign'], $code, 'text-align: ' . $atts['textalign'] . ';' );

				if ( $atts['divwidth'] > 0 ) {
					$code .= 'width: ' . $atts['divwidth'] . ';';
				}

				if ( $atts['float'] ) {
					$code .= 'float: ' . $atts['float'] . ';';
				} else {
					$code .= 'margin:0 auto;';
				}

				if ( $atts['marginleft'] > -1 ) {
					$code .= 'margin-left: ' . $atts['marginleft'] . ';';
				}

				if ( $atts['marginright'] > -1 ) {
					$code .= 'margin-right: ' . $atts['marginright'] . ';';
				} else {
					$code .= 'margin-top: 10px;';
				}

				if ( $atts['margintop'] > -1 ) {
					$code .= 'margin-top: ' . $atts['margintop'] . ';';
				} else {
					$code .= 'margin-top: 10px;';
				}

				if ( $atts['marginbottom'] > -1 ) {
					$code .= 'margin-bottom: ' . $atts['marginbottom'] . ';';
				} else {
					$code .= 'margin-bottom: 10px;';
				}

				$code .= '"><form name="" action="https://www.paypal.com/cgi-bin/webscr" method="post">
			<input type="hidden" name="cmd" value="_s-xclick">
			<input type="hidden" name="hosted_button_id" value="' . $atts['buttonid'] . '">
			<input type="image" src="https://www.paypal.com/en_US/i/scr/pixel.gif" border="0" alt=""
			width="1" height="1">';

				if ( $atts['imageurl'] ) {
					$code .= '<input type="hidden" src="' . $atts['imageurl'] . '" border="0" name="submit"
					alt="' . $edwiser_bridge_alt_add . '"';
					if ( $atts['imagewidth'] ) {
						$code .= ' width="' . $atts['imagewidth'] . '"';
					}
					$code .= ' class="ppalbtn">';
				} else {
					$code .= '<input type="hidden" src="https://www.paypal.com/en_AU/i/btn/btn_subscribeCC_LG.gif"
					border="0" name="submit" alt="' .
							esc_html__( 'PayPal - The safer, easier way to pay online.', 'edwiser-bridge' ) . '" class="ppalbtn">';
				}
				$code .= '<input type="submit" value="' . esc_html__( 'Take this Course', 'edw' ) . '" class="wdm-btn eb_primary_btn eb-paid-course button button-primary et_pb_button et_pb_contact_submit"
				id="eb_course_payment_button">';

				$code .= '<img alt="" border="0" src="https://www.paypal.com/en_AU/i/scr/pixel.gif" width="1"
				height="1" class="ppalholder">
		   </form></div>';
				break;
			case 'addtocart':
				$code = '<div style="';
				eb_check_array_value( $atts['textalign'], $code, 'text-align: ' . $atts['textalign'] . ';' );

				if ( $atts['divwidth'] > 0 ) {
					$code .= 'width: ' . $atts['divwidth'] . ';';
				}

				if ( $atts['float'] ) {
					$code .= 'float: ' . $atts['float'] . ';';
				} else {
					$code .= 'margin:0 auto;';
				}

				if ( $atts['marginleft'] > -1 ) {
					$code .= 'margin-left: ' . $atts['marginleft'] . ';';
				}

				if ( $atts['marginright'] > -1 ) {
					$code .= 'margin-right: ' . $atts['marginright'] . ';';
				} else {
					$code .= 'margin-top: 10px;';
				}

				if ( $atts['margintop'] > -1 ) {
					$code .= 'margin-top: ' . $atts['margintop'] . ';';
				} else {
					$code .= 'margin-top: 10px;';
				}

				if ( $atts['marginbottom'] > -1 ) {
					$code .= 'margin-bottom: ' . $atts['marginbottom'] . ';';
				} else {
					$code .= 'margin-bottom: 10px;';
				}

				$code .= '"><form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
			<input type="hidden" name="cmd" value="_cart">
			<input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_LG.gif:NonHosted">
			<input type="hidden" name="add" value="1">';
				if ( 1 === trim( $atts['display'] ) ) {
					$code .= '<input type="hidden" name="display" value="1">';
				}
				$code .= '<input type="hidden" name="business" value="' . $atts['email'] . '">
			<input type="hidden" name="lc" value="' . $atts['lc'] . '">
			<input type="hidden" name="currency_code" value="' . $atts['currencycode'] . '">
			<input type="hidden" name="item_number" value="' . $atts['itemno'] . '">
			<input type="hidden" name="item_name" value="' . $atts['name'] . '">';
				if ( $atts['amount'] ) {
					$code .= '<input type="hidden" name="amount" value="' . $atts['amount'] . '">';
				}
				$code .= '<input type="hidden" name="button_subtype" value="products">';

				if ( $atts['noshipping'] > -1 ) {
					$code .= '<input type="hidden" name="no_shipping" value="' . $atts['noshipping'] . '">';
				}

				if ( $atts['nonote'] > -1 ) {
					$code .= '<input type="hidden" name="no_note" value="' . $atts['nonote'] . '" />';
				}

				if ( $atts['rm'] > -1 ) {
					$code .= '<input type="hidden" name="rm" value="' . $atts['rm'] . '">';
				}

				// Add Quantity.
				if ( 'ask' === $atts['qty'] ) {
					$code .= '<input type="hidden" name="undefined_quantity" value="1">';
				} else {
					$code .= '<input type="hidden" name="quantity" value="' . $atts['qty'] . '">';
				}

				eb_check_array_value(
					$atts['shipping'],
					$code,
					'<input type="hidden" name="shipping" value="' . $atts['shipping'] . '">'
				);

				// Add Shipping2 - additional items shipping.
				eb_check_array_value(
					$atts['shipping2'],
					$code,
					'<input type="hidden" name="shipping2" value="' . $atts['shipping2'] . '">'
				);

				// Add return to merchant text.
				eb_check_array_value(
					$atts['cbt'],
					$code,
					'<input type="hidden" name="cbt" value="' . $atts['cbt'] . '">'
				);

				// Add Cancel Return URL.
				eb_check_array_value(
					$atts['cancelreturn'],
					$code,
					'<input type="hidden" name="cancel_return" value="' . $atts['cancelreturn'] . '">'
				);

				// Add Special Instructions.
				eb_check_array_value(
					$atts['cn'],
					$code,
					'<input type="hidden" name="cn" value="' . $atts['cn'] . '">'
				);

				// Add Page Style.
				eb_check_array_value(
					$atts['pagestyle'],
					$code,
					'<input type="hidden" name="page_style" value="' . $atts['pagestyle'] . '">'
				);

				eb_check_array_value(
					$atts['notifyurl'],
					$code,
					'<input type="hidden" name="notify_url" value="' . $atts['notifyurl'] . '">'
				);

				eb_check_array_value(
					$atts['notifyurl2'],
					$code,
					'<input type="hidden" name="notify_url" value="' . $atts['notifyurl2'] . '">'
				);

				eb_check_array_value(
					$atts['returnurl'],
					$code,
					'<input type="hidden" name="return" value="' . $atts['returnurl'] . '">'
				);

				eb_check_array_value(
					$atts['cancelurl'],
					$code,
					'<input type="hidden" name="cancel_return" value="' . $atts['cancelurl'] . '">'
				);

				wp_add_inline_script( 'eb_paypal_js', $atts['scriptcode'] );
				wp_enqueue_script( 'eb_paypal_js' );

				// Define Image to Use.
				if ( $atts['imageurl'] ) {
					$code .= '<input type="hidden" src="' . $atts['imageurl'] . '" border="0" name="submit"
					alt="' . $edwiser_bridge_alt_add . '"';
					if ( $atts['imagewidth'] ) {
						$code .= ' width="' . $atts['imagewidth'] . '"';
					}
					$code .= ' class="ppalbtn">';
				} else {
					$code .= '<input type="hidden" src="https://www.paypalobjects.com/en_AU/i/btn/btn_cart_LG.gif"
					border="0" name="submit" alt="' . $edwiser_bridge_alt_add . '" class="ppalbtn">';
				}
				$code .= '<input type="submit" value="' . esc_html__( 'Take this Course', 'edw' ) . '" class="wdm-btn eb_primary_btn eb-paid-course button button-primary et_pb_button et_pb_contact_submit"
				id="eb_course_payment_button">';

				$code .= '<img alt="" border="0" src="https://www.paypal.com/en_AU/i/scr/pixel.gif" width="1"
					height="1" class="ppalholder">
		   </form></div>';
		}

		return apply_filters(
			'eb_paypal_payment_button',
			$code,
			array(
				'code' => $code,
				'atts' => $atts,
			)
		);
	}

Code file location:

edwiser-bridge/edwiser-bridge/includes/payments/enhanced-paypal-shortcodes.php

Conclusion

Now that you’ve learned how to embed the Edwiser Bridge Plugin shortcode, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *